memory-leaks

Strategies For Tracking Down Memory Leaks When You've Done Everything Wrong

My program, alas, has a memory leak somewhere, but I'll be damned if I know what it is. Its job is to read in a bunch of ~2MB files, do some parsing and string replacement, then output them in various formats. Naturally, this means a lot of strings, and so doing memory tracing shows that I have a lot of strings, which is exactly what I'...

Garbage Collection in Biztalk, What would be the wise approach?

Our Biztalk 2006 application contains two orchestrations which are invoked on frequent basis (approx 15 requests per second). We identified possible memory leakages in our application by doing certain throttling threshold changes in the host. As we disabled the memory based throttling, the Process memory started increasing till 1400 MB a...

Is there a way to debug (iPhone) while running Leaks?

I'm running a debug build on the iPhone with Leaks. I'd like to break at certain points to see if particular leaks have occurred yet. This would allow me to narrow down where the leak is occurring by process of elimination. However, the debugger is ignored while Leaks is running. Any suggestions? ...

Memory Leak in C#

Is it ever possible in a managed system to leak memory when you make sure that all handles, things that implement IDispose are disposed? Would there be cases where some variables are left out? ...

Memory leak when using time in NHibernate SQL query

I use NHibernate in my ASP.NET application to connect to an MS SQL Server 2005 database. In some cases I need to write my own SQL queries. However, I noticed that the SQL server thread leaks about 50 KB of memory every time I execute the following piece of code: NHibernate.ISession session = NHibernateSessionManager.Instance.GetSession(...

False memory leaks in a MFC project

I have an MFC project, that is linking to a third party dll. At program exit, the IDE reports back that "Detected memory leaks!" and dumps the leaks. These leaks are from the third party dll. I'm pretty sure that these are falsely being reported. (A quick Google check states that MFC checks for memory leaks, before the CRT destroys v...

Why does using Causalities in CCR result in memory leaks?

Does anyone have information about using Causalities? I have tried unsuccessfully to use these on my project as they appeared to be causing massive memory loads. Is this unusual? Beyond the normal (aka overly simple) examples given in the documentation, there isn't a heck of a lot of information about using Causalities in CCR code. ...

Usage of DynamicResource to an Application Level Resource Can Cause Leaks

It seems that using a DynamicResource to refer to an application level resource can cause memory leaks to occur. Please see this WPF forum post for more info, how to reproduce it, and some workarounds. My question is: has anyone else run into it? If so, how have you worked around it? By the way, there seem to be many situations where ...

A weird memory leak problem

I use an ActiveX control which is just a HTTP handler. It sends out an HTTP request, gets the response and fires an event to the user. When the user is not requesting the ActiveX control is pretty much dormant. It just waits for a user request to send another HTTP request. As long as the window in which the OCX resides does not change (...

Class Loading problem in Java Enterprise application

I have Enterprise Application with EJB3 and JSF on Glassfish server. After running this application for more than 2 weeks I realized that I have problem with Class Loading. I don't think this is a problem with permgen. The classes loaded every time when I open a page but then they never erased from the memory. Here is the snapshot of or ...

Can using too many static variables cause a memory leak in Java?

If my application has too many static variables or methods, then as per definition they will be stored in heap. Please correct me if I am wrong 1) Will these variables be on heap until application is closed? 2) Will they be available for GC at any time? If not can I say it is a memory leak? ...

does this jQuery code snippet cause any memory leak?

I am wondering if the following jquery code causes any memory leak: $( function() { var parent=$('table#mytable tbody').get(0); $('tr:last', parent).click(function(){...}); }); For my understanding, $('tr:last', parent) is the last row which is the DOM object, but in the anonymous function, the closure has this DOM obje...

Memory leaks in a multi-threaded application using COM & C#

I have written a multi thread unmanaged application which uses COM objects in its worker threads. Everything went fine until I started using .NET objects exported as COM to do the work. Playing around with the code and commenting out parts of the .NET object functionality I managed to pin it down to the usage of COM objects from within...

Does UIWebView leak memory?

If your iPhone app uses a UIWebView, and loads many pages with large images, you may find that you are leaking memory. Can this be resolved? ...

Is this scenario suitable for WeakReferences ?

I am working on querying the address book via J2ME and returning a custom Hashtable which I will call pimList. The keys in pimList {firstname, lastname} maps to an object (we'll call this object ContactInfo) holding (key, value) pairs e.g. work1 -> 44232454545, home1 -> 44876887787 Next I take firstName and add it into a tree. The node...

Memory allocation profilers for managed and unmanaged code?

My application runs a combination of C++ (COM objects) and C# managed code. Sadly there is a n elusive memory leak I need to trace down. I've tried AQTime, which looked good on paper, but my app keeps crashing when running underneath it. Any suggestion for a better alternative? Thanks, Boaz ...

Debugging FLEX/AS3 memory leaks

I have a pretty big Flex & Papervision3D application that creates and destroys objects continually. It also loads and unloads SWF resource files too. While it's running the SWF slowly consumes memory til about 2GB when it croaks the player. Obviously I am pretty sure I let go of reference to instances I no longer want with expectation th...

Best approach to debugging applicationDidReceiveMemoryWarning on iPhone?

Need advice on how to debug this. I'm new with limited environments and have no previous embedded or smart phone programming experience so I could use some clues. Already aware of: Instruments, Clanger Static Analysis, manual code review, etc. Instruments seems to be very helpful in general but quite time consuming and freezes up a lot o...

Common Java memory/reference leak patterns?

Maybe the most typical example is the JDBC closing done wrong way and not handling the possible exceptions correctly. I am very curious to see other examples you have seen - preferably web application related. So, are there any common leak patterns in Java? ...

VB6 Memory Leak

Can a VB6 program that does not contain the keyword 'New' have memory leaks? If so, please provide an example. ...