memory-leaks

Memory Leak Detecting and overriding new?

I am attempting to get Memory leak detection working with the help of these two articles: http://msdn.microsoft.com/en-us/library/e5ewb1h3%28VS.80%29.aspx http://support.microsoft.com/kb/q140858/ So in my stdafx.h I now have: #define _CRTDBG_MAP_ALLOC #include <stdlib.h> #include <crtdbg.h> #define new new(_NORMAL_BLOCK,__FILE__,__LIN...

How to access the full stack trace of mallocs in an MFC 8.0 application?

Hello, I'm trying to find a memory leak in a windows MFC 8.0 application (Release build). After failing to show the full stack trace of allocations using WinDbg (or umdh) due to VC8 CRT's malloc problem with FPO, I've tried to apply the solution proposed here (i.e. using LeakDiag with DbgHlp StackWalk enabled) only to realize that Leak...

How to leak a string in Delphi

I was talking to a co-worker the other day about how you can leak a string in Delphi if you really mess things up. By default strings are reference counted and automatically allocated, so they typically just work without any thought - no need for manual allocation, size calculations, or memory management. But I remember reading once ...

sun.font.TrueTypeFont Memory Leak?

I've been profiling some Java software using heap dumps and there is 350 instances of sun.font.TrueTypeFont, in other heap dumps I have taken there have been more. There is only 5 instances of Font created by the app code, and 24 instances in all, mostly created by WDesktopProperties and other Java library classes. Is this number of Tr...

Does Apple reject Leaking iPhone apps?

Info on this can be found here and there, but is there a definite answer? Does anyone know from experience that his leaking app has approved or that his app was rejected "because it was leaking"? I am close to submitting a game that leaks a very small amount of data (32 bytes at a time), about once or twice a minute. Since the play cycl...

С++: memory leaks

Sorry for my English. The question: At what value of variable n the following code will cause memory leaks? That's the code: int* Bar(int n) { if (n == 1) throw "exception"; return new int[n]; } void Foo(int n) { int *a = Bar(n); if (n <= 2) return; delete[] a; } It's clear that if n is 2 there will be memory le...

Test for memory leaks in .NET applications

Are there any good(and free) tools for either analyzing static source or running programs to help detect memory leaks? I've built some windows services and want to make sure the are not going to consume memory if I leave them running for weeks on end. ...

How to test a web application for memory leaks?

How do we test a web application for the memory leaks? How much does it contribute to the overall performance of the site? Please suggest any tool which can help us test the web application for memory leaks. ...

What Android tools and methods work best to find memory/resource leaks?

I've got an Android app developed, and I'm at the point of a phone app development where everything seems to be working well and you want to declare victory and ship, but you know there just have to be some memory and resource leaks in there; and there's only 16mb of heap on the Android and its apparently surprisingly easy to leak in an ...

Best practises to stop memory leaks and improve performance

To put it simply i am a fairly new PHP coder and i was wondering if anyone could guide me towards the best ways to improve performance in code as well as stopping those pesky memory leaks, my host is one of those that doesn't have APC or the like installed so it would all have to be hand coded -_- ...

asp.net application pool and garbage collection

Sorry if this is a duplicate, i've read many questions that are either very similar or require roughly the same keywords to describe (but aren't quite the same)... situation: an asp.net application has a connection pool memory leak problem (where connections are not being closed correctly for example)...I need clarity on the following: ...

How to spot memory leaks in profiler?

I have an AIR/Flex app I made, I have a few people testing it and everyone is reporting that after leaving it running for a while, it is making all there machines run very slow. It runs fine at first so this must be a memory leak somewhere. I used the profiler on this and the only thing that shows as using a substantial amount of memory ...

How to add a breakpoint to objc_exception_throw?

this was the answer from the brad larson on this SO question If you add two breakpoints, you should be able to debug these exceptions. To do this, go to Run | Show | Breakpoints and create two global breakpoints (I do them globally because they are so useful in all my applications). The first should be named "objc_exception_throw" and i...

Memory climbs but without any memory leak in code, happens in iPhone 3G, SDK 3.0

Hello all, I found that memory kept growing without any memory allocated in code when running a opengles based program on iPhone 3G device. Copy from Instrument: Instances / Responsible / Responsible Caller ------------------------------------------------------------ GeneralBlock-8 / QuartzCore / x_list_prepend_ Gen...

Possible memory leak due to not using StringBuffer?

Can the following code cause a memory leak? Would using a StringBuffer actually improve memory usage? A little background: A coworker has been pushing his theories on memory leaks, and this is code he has identified as being problem code (without doing any sort of profiling), which he claims can cause a memory leak. I disagree with this...

How to find dispose and memory issues? C#

My app was using 150mb of memory not to long ago, now it is at 286mb. It slowly rises so i must be forgetting to dispose something. This isnt much of a problem for me since i have 4gb but i want to send this to others who have only 1gb of ram. other then going through the code line by line how can i find objects that need to be disposed ...

Can I programmatically view the managed heap contents from a .NET application?

Is it possible to access the managed heap in a .NET application and e.g. enumerate the objects that are currently allocated there? I know there are various tools out there that allow you to do that, but I would rather do this myself from code so that I can use it in automated tests, like for checking if everything is disposed and cleane...

Valgrind vs Purify

Which one is better on Linux? Valgrind or Purify What is your opinion of using them? ...

On jquery, closures, and possible memory leaks

Hi, I've read quite a bit about how memory leaks are created in various versions of IE. Some great information can be found here: http://msdn.microsoft.com/en-us/library/bb250448%28VS.85%29.aspx http://laurens.vd.oever.nl/weblog/items2005/closures/ Using closures with JQuery is a very common practice. I can't find any articles at al...

Python memory footprint vs. heap size

I'm having some memory issues while using a python script to issue a large solr query. I'm using the solrpy library to interface with the solr server. The query returns approximately 80,000 records. Immediately after issuing the query the python memory footprint as viewed through top balloons to ~190MB. PID USER PR NI VIRT R...