memory-leaks

NSDictionary as property

I am getting memory leaks pointing to the line "NSDictionary *dw = [NSDictionary dictionaryWithContentsOfFile:path];" by using following code NSDictionary *_allData; @property (nonatomic, retain) NSDictionary *allData; @synthesize allData = _allData; + (NSString*)getNSPath { NSArray *paths = NSSearchPathForDirectoriesInDomains(...

UIView being retained

Hi, I'm having real problems tracking down why my UIView isn't deallocing. I have a UIViewController with several UIViews, all of which are IBOutlet properties that retain. I'm sure to release the UIView in the dealloc method of the UIViewController. However the dealloc of my UIView is never called. I have no idea what else has reta...

windbg !gcroot <address> returns no roots

What does it mean if !gcroot returns an empty thread list? 0:000> !gcroot 0000000010817c50 Note: Roots found on stacks may be false positives. Run "!help gcroot" for more info. Scan Thread 2 OSTHread 15a4 Scan Thread 10 OSTHread 1db4 Scan Thread 11 OSTHread 147c Scan Thread 12 OSTHread 15d4 Scan Thread 14 OSTHread 9dc Scan Thread 15 O...

Memory leak. ManagementBaseObject stays as GC Root, but never cleaned up

I am using ANTS Memory Profiler to try and determine why my application's memory usage is continuing to grow. I run the application and take various snapshots over time. I can see that the live instances of IWbemClassObjectFreeThreaded and ManagementBaseObject keeps increasing over time. Looking at the class reference explorer I can s...

Long lived Java WeakReferences

I am currently trying to diagnose a slow memory leak in my application. The facts I have so far are as follows. I have a heap dump from a 4 day run of the application. This heap dump contains ~800 WeakReference objects which point to objects (all of the same type, which I will call Foo for the purposes of this question) retaining 40mb ...

How can I trace an apparent memory leak in an asp.net application?

Some background info: We have several websites running on a 64-bit machine with IIS6 These websites all have the same core code, but different skins and content We have a SQL 2005 database which is fairly heavily used throughout the site Historically we've used SQL stored procs, but have been gradually transitioning to NHibernate. The ...

Unity Container Memory Leaks

Hi I´m working on a project that uses Enterprice Libraries´s Unity container to resolve dependencies for exception handling, cache, logging and db access but we keep getting a lot of leaked objects into memory. We are using property injection like this: [Dependency] public Database DB { get { return db; } set { db = value; } } [De...

Upstart init is leaking memory, how do you debug it?

I've got a memory leak in Upstart init process (pid 1), what options I have on debugging it? EDIT: Suggest me some real tools for this, manually putting printfs or calculating memory allocations by hand isn't gonna cut it. Also dumping init core and poking around that is not really an option. UPD1: valgrind doesn't work. Replacing /sbi...

Memory Leaks in Winforms application.

Hi, We are developing a big .Net Windows Forms application. We are facing memory leak/usage problem in that despite we are disposing the forms. Scenario is like: Our application is using 60K of memory with list of records displaying in a Grid. When user click on a record it opens a form myform.showDialog, show the details. Memory ju...

How can I find the memory leak in my Javascript?

I have an application that displays tables of data, in a paged format. Clicking on a "page" button re-renders the table. (These are not HTML pages - these are just buttons that re-populate my table with a new "page" of data) Each table cell has event handlers attached to it. For all intents and purposes, if the application starts on "Pa...

Memory Leaks in Irregularly Shaped UIButtons

I know this is a long-shot, but since I need this code to work, maybe someone here can help. I'm using the Irregularly Shaped Buttons code from CodeProject.com in one of my iPhone apps. Works great, but Instruments is reporting two memory leaks. I'm using the code in a standard UIViewController, but that is inside a UINavigationContro...

Removelistener of timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);

I'm using TweenLite class (AS3), I have very big project, should I removelistener of timingSprite.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true); in Tweenlite.as file, after my animation is complete???? Because of big project, i'm affraid that ENTER_FRAME causes memory leak for my project. Thank you ...

visual vm force gc

hi, i sampling the memory usage and count number of instances for POJO. if when i press 'garbage collecting' in visual vm and i can see the instances down , does that mean it's memory leak free ? how to force jvm do garbage collecting everyday at midgnight ? (just like automatically press garbage collect on visualvm) ? i see visual...

Problem with iPhone memory leaking

I have a piece of Objective-C code I've inherited and the leak tracking tool has identified a memory leak in the code. I am not entirely up on the memory tracking rules of Objective-C so I'm having a real problem with understanding why the memory is leaking. The code is as follows: + (NSString *) getRecordingsDirectory { NSArr...

I have a memory leak using ListActivity in Android

I have an application that uses a Service and some list activities. When the activities are opened, I can see the heap usage increase in DDMS, when the activities are closed, the heap usage decreases slightly. The service is still running in the background at this point. If the activity is started again by re-running the application and ...

how to solve Instruments detected leaks whose responsible library is Apple's framework?

Hi all, I'm checking memory leaks in my apps using Instruments Leaks tool. After fixing all leaks whose responsible library is my app. I figure out that there still have a lot of leaks whose responsible libraries are iOS's framworks, based on what Instruments said? This is a screenshot of Intruments: I think these leaks may be caus...

What is causing the OS to become slow after running a memory intensive Java application?

I am currently running a small java class for scientific calculations on graphs (which internally creates lots of huge collections) from within Eclipse on MacOSX Snow Leopard. I have a Macbook with 2GB of RAM and to successfully run the app without OutOfMemory Error I need to run it from eclipse with -Xmx1200m (I know this is very much)....

Why does a Process's "Private Bytes" memory counter never return back to it's original value?

If I have a native C++ program and look at it's initial "Private bytes" memory counter why would it not go back down to it's original value after an object has been created and then deleted? For example if I have an application (32bit, Native C++ MFC ) that has two buttons. One in a loop that allocates 1,000,000 instances of an object ...

IPhone - copyWithZone leak

Testing my app on the device it returns a leak whe i call the copy of a custom object ande i can't understand why. this is the call: NSMutableArray *arr = [[NSMutableArray alloc] initWithCapacity:5]; for (SinglePart *sp in [copyFrom partList]) { [arr addObject:[sp copy]]; } self.partList = arr; [arr release]; this is the method:...

Why do I get a leak when using CFPropertyListCreateDeepCopy?

I am creating a deep mutable copy of a dictionary but for some reason am getting a leak. I've tried this: NSMutableDictionary *mutableCopy = (NSMutableDictionary *)CFPropertyListCreateDeepCopy(kCFAllocatorDefault, sectionedDictionaryByFirstLetter, kCFPropertyListMutableContainers); self.copyOfSectionedDictionaryByFirstLetter = mutableCo...