Memory Leak, part I
Memory Leak, part I
- Subject: Memory Leak, part I
- From: John Love <email@hidden>
- Date: Wed, 18 Feb 2009 18:09:42 -0500
[this is part I of a two-part plea for help]
I I have read Apple's "ManagingMemory.pdf" and am still having
difficulty understanding the use of MallocDebug which is detailed in
"MemoryMgmt.pdf". I have 5 methods in the generation of a background
thread and I cannot figure out where the memory leak is:
MallocDebug states that there is zero leakage for each of these
methods, but there is a leakage = 480 bytes in 24 nodes for
thread_start ????
(1)
- (void) startBgCalculation {
/*
setCalcStatus calls:
itsDictionary = [[NSThread currentThread]
threadDictionary];
[itsDictionary setValue:[NSNumber
numberWithInt:kCalculating] forKey:staticString#1];
*/
[self setCalcStatus:kCalculating];
[NSThread detachNewThreadSelector:@selector(bgCalcThread)
toTarget:self withObject:nil];
}
(2)
- (void) bgCalcThread {
NSAutoreleasePool *bgCalcThreadPool = [[NSAutoreleasePool
alloc] init];
[self doCalculation];
[self performSelectorOnMainThread:@selector(endBgCalculation/
*:*/)
withObject:nil
waitUntilDone:YES];
[bgCalcThreadPool release];
}
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden