memory-leaks

Send signal to a process inside valgrind?

Hi, How can I send a signal to my process which runs inside valgrind to check its memory usage status? Thanks! ...

Am I supposed to call EntityManager.clear() often to avoid memory leaks?

I'm new to JPA/OpenJPA and I noticed that if I don't call EntityManager.clear() after i persist entities I get an OutOfMemoryError (I keep adding new entities in a loop). I'm not sure if this is the expected behavior or it's just and OpenJPA 1.2.1 glitch. So, am I required to explicitly detach the entities myself? If I'm not, it's a go...

iPhone: Is this a leak or not

Recently someone on Stack Overflow told me that the code below does not leak, that the property handles retention itself: self.locationManager = [[CLLocationManager alloc] init]; in dealloc : self.locationManager = nil; where in the .h file: @property (nonatomic, retain) CLLocationManager *locationManager; I thought that was ...

iPhone dynamic UIButton in UITableView

I'm creating a button for each cell row in a tableview. The button acts as switch to add the selected row as 'favorite' in NSUserDefaults. My problem is that whenever I press this button, a new one get drawn on top of the old one. How do I release/reuse it right? This is what my cellForRowAtIndexPath method looks like: - (UITableViewCel...

How to detect memory leaks in C# application?

How to detect memory leaks in C# application? What tools need to use? What best practices do you know? ...

iPhone Memory Management with Properties of Singletons

I seem to have a fundamental gap in my memory management understanding. The code below is located within a singleton that gets called multiple times within my app to parse data that is downloaded from the web. For each article I download, I allocate a mutable string, then do tons of parsing, then write the file to the file system for la...

Are system framework leaks my fault / preventable in iPhone SDK?

This is a bit of a general question, I am debugging and testing on the iPhone and the leaks performance tool is reporting a ton of relatively small leaks from code that I didn't write. I.e. in the responsible frame column the following are blamed for leaks: [UIColor allocWithZone:] NSKeyedUnarchiver NSCFString copyWithZone CGTypeCreate...

Finding leaks under GeneralBlock-16?

If ObjectAlloc cannot deduce type information for the block, it uses 'GeneralBlock'. Any strategies to get leaks from this block that may eliminate the need of my 'trial and error' methods that I use? The Extended Detail thing doesn't really do it for me as I just keep guessing. ...

Memory Leak warning I can't solve

The static analyzer is showing up a leak in this block of code (specifically the link with the copy in it): - (void)parser:(NSXMLParser *)parser didEndElement:(NSString *)elementName namespaceURI:(NSString *)namespaceURI qualifiedName:(NSString *)qName { if ([elementName isEqualToString:@"item"]) { [elements setObject...

Severe memory problems with UIImagePickerController using Camera

I've noticed that when I load a UIImagePickerController and I take a picture with it, didReceiveMemoryWarning is called. Also, in Instruments, there is a significant memory leak (not by me, I swear!). I've heard that this is a problem with UIImagePickerController but, I'm not sure how to fix it. Here is my implementation of UIImagePicker...

Why is this code producing an memory leak?

The Leaks Instrument in Xcode shows me an memory leak here. I have commented the affected line which Leaks is complaining about. But I see no error in my memory management... - (void)setupViewController { MyViewController *myVC = [[MyViewController alloc] init]; UITabBarItem *tbi = [[UITabBarItem alloc] initWithTabBarSystemItem...

ERROR: Memory Leak, data formatters temporarily unavailable

I am developing a quiz app. I take questions from a xml file, parse it and display random questions. These are stored in NSdictionary and NSMutableArray. Also the app plays background music and sound for clicking of buttons(AVAudioPlayer). and vibration( AudioServicesPlaySystemSound(kSystemSoundID_Vibrate)) In one particular functi...

Searching for memory leaks in Apache httpd and modules

What is the best way for finding memory leaks in Apache httpd and httpd modules? Are there any howtos? I'v tried valgrind a little, but few obstacles appeared: Valgrind expects for binary to exit normally. I have managed to do that with MaxRequestsPerChild and -X parameter. Valgrind reports about lots of stuff, probably connected wit...

Why is Process.PagedMemorySize64 > 0 when there is no paging memory on the machine?

I am runing .net code on a machine with the page file size set to zero. My application logs System.Diagnostics.Process.PagedMemorySize64 and is showing a value > 0. How can this be? The documentation for PagedMemorySize64 reads: The value returned by this property represents the current size of memory in the virtual memory pagin...

WPF Memory Leak - Bug In Framework?

Ok, to give a quick rundown of the context of my situation. We have a windows forms tab control, and inside the tab is a element host that contains a wpf usercontrol. When the tab opens, I have a grid that overlays the whole usercontrol to indicate loading. Below is the xaml. I removed some bindings and xaml that aren't relevant. <Grid...

Sqlite Database LEAK FOUND exception in android?

hi all, i am getting this exception in database Leak Found my LOGCAT Shows this: 02-17 17:20:37.857: INFO/ActivityManager(58): Starting activity: Intent { cmp=com.example.brown/.Bru_Bears_Womens_View (has extras) } 02-17 17:20:38.477: DEBUG/dalvikvm(434): GC freed 1086 objects / 63888 bytes in 119ms 02-17 17:20:38.556: ERROR/Database(...

Handle leak when socket is forcibly closed by remote host? (.net)

I have created a simple tcp based "echo protocol" and notice that I suffer from handle leak on the server when the client forcibly closes the connection (sends a reset). I catch the ConnectionReset and dispose the socket in the same way I do when the socket is closed (socket.Shutdown and socket.close). As anybody encountered such a prob...

Django memory usage going up with every request

I moved my first Django project from DjangoEurope to Webfaction, and that started an issue looking like a memory leak. With every single request memory usage of the server process goes up about 500kb. It never goes down. This goes on until Webfaction kills it for using too much memory. I can clearly see this when I refresh the Django's ...

Debugging memory leaks with libMallocDebug

I want to use the MallocDebug app to find some memory leaks in my app. I'm running Mac OS X 10.6.2. Whenever I try and following the instructions listed in this guide, I get the following error: dyld: could not load inserted library: /usr/lib/libMallocDebug.A.dylib Trace/BPT trap I have verified that the .dylib file exists, and I get...

Sudden excessive memory usage

I have an issue where my application runs fine for hours but then suddenly increases memory usage (in a matter of minutes) until it crashes. If we minimize the application during the increasing memory usage, the memory goes way down and stays down for a while. This seems to happen very inconsistently. Any idea how to troubleshoot it/what...