memory-leaks

Deallocated Heap Not Being Reclaimed?

老子叫甜甜 提交于 2019-12-23 05:32:32
问题 I have C++ process that ingests large blocks of data and stores them in memory. The storage array contains roughly 10 GB of data partitioned into 4MB blocks. As new data arrives it creates a new block and then deletes an old block if it is full. This process cycles through the full circular buffer once every 10 - 60 seconds. We are running on an x86_64 RH5 and RH6 and compiling with the Intel 14 compiler. We are seeing a problem where the overall process memory usage grows over time until the

jstl forEach tag in jBoss 7, memory leak?

◇◆丶佛笑我妖孽 提交于 2019-12-23 05:13:28
问题 The YourKit profiler is used to analyze snapshot. Steps that have been performed (for the only user): generation number has been increased. some actions on the application page have been done. most of them get entities and display them via jstl forEach tag. the logout has been performed (session.invalidate()) the session timeout is set to 5 minutes. consequently I've waited for 6-8 minutes to make sure everything in session is invalidated. the snapshot via YourKit profiler was made. What I've

Memory leak when resizing UIImage

你离开我真会死。 提交于 2019-12-23 05:07:59
问题 I've read through multiple threads concerning the topic but my problem still persists. When I'm resizing an Image with following code: extension UIImage { func thumbnailWithMaxSize(image:UIImage, maxSize: CGFloat) -> UIImage { let width = image.size.width let height = image.size.height var sizeX: CGFloat = 0 var sizeY: CGFloat = 0 if width > height { sizeX = maxSize sizeY = maxSize * height/width } else { sizeY = maxSize sizeX = maxSize * width/height } UIGraphicsBeginImageContext(CGSize

Why is this leaking memory? UIImage `cellForRowAtIndexPath:`

陌路散爱 提交于 2019-12-23 05:04:02
问题 Instruments' Leaks tells me that this UIImage is leaking: UIImage *image = [[UIImage alloc] initWithContentsOfFile:[imagesPath stringByAppendingPathComponent:[NSString stringWithFormat:@"/%@.png", [postsArrayID objectAtIndex:indexPath.row]]]]; // If image contains anything, set cellImage to image. If image is empty, try one more time or use noImage.png, set in IB if (image != nil){ // If image != nil, set cellImage to that image cell.cellImage.image = image; } image = nil; [image release];

To allocate or not to allocate. Invalid read of size 1 errors. [Staring for 2 hours]

末鹿安然 提交于 2019-12-23 05:02:05
问题 This is the code I'm working on code However there are problems. Some or all might be because of not allocating space for data in nodes (line 135~) because the line is changing during iteration in main . But when I allocate space for it, at line 135, the outcome doesn't change much and there is memory leak. I'm stuck. I'm about to go crazy. Can you help me to fix errors? Any help is appreciated. Thank you! Output: a@ubuntu:~/os/hw1$ ./o f1.txt f2.txt o.txt *** Error in `./o': double free or

Why isn't nodes and listeners being cleaned up properly and in a consistent way?

♀尐吖头ヾ 提交于 2019-12-23 04:30:07
问题 I'm investigating the cause of a memory leak having to do with the nodes count, but I'm just getting confused when I look at what angular is doing, because the results are not consistent enough to draw a clear line of what is happening. I've created a really simple app, it has 1 controller and 2 views. Each view use the same controller: core.controller('CoreCtrl', [function() { var core = this; core.helloWorld = function() { console.log('hello world'); }; }]); core.config(['$routeProvider',

Should I rely on Clang Static Analyser or Instruments?

旧城冷巷雨未停 提交于 2019-12-23 04:09:18
问题 I am working on iPhone application.. For the purpose of finding memory leaks I have started the application with the instruments which gave me lots of leaks . which i was unable to understand then in a forum somewhere I have read that the instruments gives spurious leaks sometime so I should start by the Static analysis . Then I have used Clang Static analyser and it gave me only 7 bugs after solving that my app was bug free from the view of Static analysis . Both analysis leaks were

Android Memoryleak in code

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-23 03:57:24
问题 I am trying to understand the concept of memory leaks. I tried this code and tried few ways i found from related posts but i could not solve the issue. Need help on understanding where memory leak happens in this code. My application has only 2 activities //First Activity package com.pace.mat; import android.app.Activity; import android.app.Dialog; import android.content.Context; import android.content.Intent; import android.os.Bundle; import android.view.View; import android.view.Window;

memory leak issue on using java substring method

被刻印的时光 ゝ 提交于 2019-12-23 03:41:22
问题 I have looked through all the memory leak solutions for java substring method. I still get the out of memory error due to this issue. I have an arraylist of string which are of length 1000-3500. i index them and store them. The issue is each string needs to be run through loop to store all possible varying lengths of same string. To do this, i use for loop and substring method. and this method causes the memory leak problem. A sudo code of what i have done: for(int i=0;i<str.length;i++) { /

memory leak issue on using java substring method

♀尐吖头ヾ 提交于 2019-12-23 03:40:06
问题 I have looked through all the memory leak solutions for java substring method. I still get the out of memory error due to this issue. I have an arraylist of string which are of length 1000-3500. i index them and store them. The issue is each string needs to be run through loop to store all possible varying lengths of same string. To do this, i use for loop and substring method. and this method causes the memory leak problem. A sudo code of what i have done: for(int i=0;i<str.length;i++) { /