memory-leaks

Javafx growing memory usage when drawing image

邮差的信 提交于 2020-01-06 19:37:26
问题 I'm creating a quite simple Go board game in JavaFX. I stumbled on growing memory usage in my application and after reducing everything unnecessary, it appeared that even the minimal example causes huge memory growth overtime, its about 50 to 100MB/s . Here's the code: import javafx.animation.AnimationTimer; import javafx.application.Application; import javafx.scene.Group; import javafx.scene.Scene; import javafx.scene.canvas.Canvas; import javafx.scene.canvas.GraphicsContext; import javafx

Getting Pixmap is a null pixmap on calling a function 500 times

≡放荡痞女 提交于 2020-01-06 19:31:43
问题 I am showing a image in qt label. Below is my code: void MyClass::onPushButtonClicked(QString myurl) { this->setCursor(Qt::WaitCursor); ui.qtImageLabel->clear(); qDebug()<<QTime::currentTime()<<"MyClass: onPushButtonClicked"; QNetworkAccessManager *qnam_push_button_clicked_show_image; QNetworkReply *reply; QNetworkRequest request; request.setHeader( QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded" ); QUrl url(myurl); request.setUrl(url); qnam_push_button_clicked_show

Getting Pixmap is a null pixmap on calling a function 500 times

泪湿孤枕 提交于 2020-01-06 19:31:04
问题 I am showing a image in qt label. Below is my code: void MyClass::onPushButtonClicked(QString myurl) { this->setCursor(Qt::WaitCursor); ui.qtImageLabel->clear(); qDebug()<<QTime::currentTime()<<"MyClass: onPushButtonClicked"; QNetworkAccessManager *qnam_push_button_clicked_show_image; QNetworkReply *reply; QNetworkRequest request; request.setHeader( QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded" ); QUrl url(myurl); request.setUrl(url); qnam_push_button_clicked_show

Memory is not getting released

拟墨画扇 提交于 2020-01-06 18:03:56
问题 When I run the following program ... application is holding some 5MB of memory even after releasing all objects ... when I don't add an object to list everything works fine ... but I am not sure why application is holding memory even after releasing the list. I have read this link "NSMutableArray big memory hog?" and even tried with custom mutable array by mikeash MACollections -- in all the cases ... the memory allocated in the loop never get released if I add the object into list. Please

Calling AFNetworking in NSTimer causes serious memory leak

一笑奈何 提交于 2020-01-06 15:11:31
问题 I'm trying to debug a difficult memory leak. In MyAppDelegate.m, I have - (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { self.notificationTimer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(syncNotifications:) userInfo:nil repeats:YES]; return YES; } - (void)syncNotifications:(NSTimer*)timer { NSString *path = @"http://example"; NSLog(@"GET: %@", path); AFHTTPRequestOperationManager *network =

FFMPEG with QT memory leak

会有一股神秘感。 提交于 2020-01-06 14:29:06
问题 Let me start with a code clip: QByteArray ba; ba.resize(500000); int encsize = avcodec_encode_video(context, (uint8_t*)ba.data(), 500000, frame.unownedPointer()); What I'm doing is encoding the data from frame and putting the data into the buffer pointed at QByteArray. If I comment out the avcodec_encode_video line my memory leak goes away. unownedPointer() looks like this: if (this->frame != NULL) return this->frame; this->frame = avcodec_alloc_frame(); uchar *data = this->img.bits(); frame-

How i solve memory leak problem?

ぐ巨炮叔叔 提交于 2020-01-06 12:49:15
问题 I developing an simple application in which design or make code in which i creating and instance object of UIImage. When i swip on Ipad screen it make up an image of the sreen and that image i render into UIImage object after that this image i set into UIImageView object and UIimage object is released. Every time i swipe on the screen and above process is does again and again. But it give me leak in renderImage = [[UIImage alloc] init]; . Code, _renderImage = [[UIImage alloc] init];

Where/how to delete an object within another object, outside the function that it was created in

泪湿孤枕 提交于 2020-01-06 12:27:08
问题 In order to solve this problem Bad memory management? Class member (boolean) value greater than 1, in recursion function, I ran the whole program under Valgrind and found a few memory leak problems that occurred before the step. There were 2 'definitely lost' problems identified in the function CMFLoader. (here MyDataset is a vector of Molecule objects, and each Molecule object contains an Elements object) In CMFLoader::loadFile(vector& MyDataset), I originally have MyDataset.push_back(

Another iPhone Memory leak issue

喜夏-厌秋 提交于 2020-01-06 08:43:19
问题 I have memory leak on jsonParser. Here is my code - (id) objectWithUrl:(NSURL *)url { SBJsonParser *jsonParser = [SBJsonParser new]; NSString *jsonString = [self stringWithUrl:url]; // Parse the JSON into an Object return [jsonParser objectWithString:jsonString error:nil]; } This is the error message I'm getting, potential leak of an object allocated on line 192 and stored into 'jsonParser' Please help. 回答1: +new is equivalent to the [[SBJsonParser alloc] init] call so you're responsible to

Another memory leak question

跟風遠走 提交于 2020-01-06 06:57:34
问题 My application keeps running for 4 to 6 hours, During this time there is no contineous increase in memory or anything similar. Then after 4 to 6 hours i start getting EOutofMemory Exceptions. Even still at that time there is only 900MB out of 3GB RAM is used as per task manager. And application itself is not using more then 200MB . Then why i am getting EOoutofMEmory error ? Does it mean that memory leak is not necessarily visible in task manager ? Regagards 回答1: Use Process Explorer instead