memory-leaks

Strange iPhone memory leak in xml parser

Update: I edited the code, but the problem persists... Hi everyone, this is my first post here - I found this place a great ressource for solving many of my questions. Normally I try my best to fix anything on my own but this time I really have no idea what goes wrong, so I hope someone can help me out. I am building an iPhone app tha...

Question about memory leak in .NET

Hi, I have some memory leak in my C# code I have a class with some SqlCommand fields inside it. I also have an Initialize() public method that allocates these SqlCommands fields. Before the allocation I check (in the Initialize's code) whether it not the first time I do allocation (i.e not the first time Initialize is called) and if i...

Delphi 2009 - Can an Interface Property Cause a Memory Leak?

I inherited an Intraweb app that had a 2MB text file of memory leaks as reported by FastMM4. I've got it down to 115 instances of one class leaking 52 bytes. A brief description of the bad actor is: TCwcBasicAdapter = class(TCwcCustomAdapter) protected FNavTitleField: TField; function GetAdapterNav(aDataSet: TDataSet...

C/C++ Memory Problem?

Hi there, Programming for my Arduino (in some kind of mix of C/C++), I noticed something weird. Everytime I communicate through the serial port, I keep an eye on the SRAM usage. Normally, it ranges between 300~400 bytes. However, after adding a new routine (see below), I noticed it always jumped from 300~400 bytes of free memory to EXA...

Does iPhone OS reclaim user-space memory at exit?

I'm reading up on the leak-finding tools for iPhone development and intentionally inserting and looking for memory leaks in my small program before I get into a bigger, harder-to-debug project. It's no problem to identify a memory leak that, say, occurs in a regularly invoked method like responding to a touch event. The leak instrument...

iPhone code leaks and I don't know why

Hi, this is a well known snippet, how to select a picture from the iPhone photo library: - (IBAction)selectExistingPicture { if ([UIImagePickerController isSourceTypeAvailable:UIImagePickerControllerSourceTypePhotoLibrary]) { UIImagePickerController *picker = [[UIImagePickerController alloc] init]; picker.delegate = self; picker....

Adobe AIR, memory leaks.

We all know how web browsers (such as Firefox) are certain to fill up memory consumption because we continuously execute JavaScript code (from websites) that is prone to memory leakage. I am debating in developing a Desktop app, and given my experience with Javascript/Css/HTML, I thought I would give AIR a try, this way I don't have to...

Memory leak using WMI in Delphi 7

I'm experiencing a memory leak when using WMI from Delphi 7 to query a (remote) pc. The memory leak only occurs on Windows 2003 (and Windows XP 64). Windows 2000 is fine, and so is Windows 2008. I'm wondering if anyone has experienced a similar problem. The fact that the leak only occurs in certain versions of Windows implies that it mi...

ExtJS and the infamous memory leak

What, if anything, do I have to be careful about doing to prevent the infamous IE circular reference memory leak when using ExtJS? I have seen this SO question and this ExtJS forum thread, but I'm hoping for some short checklist of things to do/avoid. ...

Cause for memory leaks in websphere ValueHandlerPool (Suspected)

We encounter an OutofMemory error. I analyzed the *.phd file, that websphere dumps, using Eclipse Memory Analyzer. The Leak Suspect Report of MAT, provides the following information The class "com.ibm.rmi.io.ValueHandlerPool", loaded by "com.ibm.oti.vm.BootstrapClassLoader @ 0x466578", occupies 68,734,136 (50.25%) bytes. The memory is ...

How can I control IE6+jQuery+jQuery-ui memory leaks ?

Here's a sample page with a couple datepickers. Here's the Drip result for that: This page leaks indefinitely in IE6sp1 when I click the Refresh button repeatedly (IE6sp3+, Opera 9, Chrome2, and FF3+ seem to be good). The memory goes up and never goes down until I actually close the browser completely. I've also tried using the lates...

G++ Multi-platform memory leak detection tool

Does anyone know where I can find a memory memory leak detection tool for C++ which can be either run in a command line or as an Eclipse plug-in in Windows and Linux. I would like it to be easy to use. Preferably one that doesn't overwrite new(), delete(), malloc() or free(). Something like GDB if its gonna be in the command line, but...

Freeing Multiply-referenced Objects

This is another post about me inheriting an Intraweb app that had a 2MB text file of memory leaks as reported by FastMM4, where I've got it down to 115 instances of one class leaking 52 bytes each. The leaks are from a rather convoluted instantiation and handling of the class. Each instantiation of the class is needed to get the app to...

No leaks appearing in Instruments, even though I'm sure they exist

Hi, I'm checking for leaks in Instruments, and I've set to check every second, but no leaks are appearing. I'm sure there must be some in my app, is there anything which could stop these from appearing? Is there a good way I can create a leak so that I can test if leaks do show up in Instruments? Thanks! ...

What sort of memory leaks should I watch for with jQuery's data()?

Should I pair every data() call with a later removeData() call? My assumptions: jQuery's remove() will remove elements from the DOM, and if I don't have any other references to remove, I don't have to do any more clean up. However, if I have some javascript var or object referring to one of the elements being removed, I'll need to clea...

Read/Write on protected memory exception thrown (.net)

I am being told by an exception that's being thrown in the last line, that I'm trying to read/write on protected memory. What am I doing wrong here? Thanks int count = (int)WinApi.SendMessage(_chatHwnd, WinApi.LB_GETCOUNT, 0, 0); Debug.WriteLine("count=" + count); StringBuilder sb = new StringBuilder(count * 20); for (in...

iPhone SDK: I have memory issues, can anyone help a newbie fix them?

Hello, I have been developing on the iPhone platform for a very short time, and already I've had my fare share of syntax errors, and now memory issues. In my iPhone app an image view is animated multiple times by different buttons(6), and this works well on the iPhone without problems, but when I tested my app with instruments for the f...

Checking memory allocation in Instruments

Hello, I've cleared my app of leaks using the leaks tool, but I still notice that the objectalloc tool jumps up in the number of objects allocated and footprint when I switch views. I'm especially seeing high numbers of: GeneralBlock-16 with mostly Foundation responsible with caller NSLogv and GeneralBlock-0 with mostly QuartzCore re...

How do I know who holds the shared_ptr<>?

I use boost::shared_ptr in my application in C++. The memory problem is really serious, and the application takes large amount of memory. However, because I put every newed object into a shared_ptr, when the application exits, no memory leaking can be detected. There must be some thing like std::vector<shared_ptr<> > pool holding the r...

How to find a memory leak in a web application running in IE?

I've written a web app which after a while causes IE 8's memory usage to soar to just under a Gig. I think there is a memory leak somewhere in the javascript, but I've got no idea how to find the root cause of this. Does anyone have any suggestions? I make use of intervals to call ajax methods on a Java backend and I'm using Prototype ...