Use Instruments instead; it will be much easier to find your memory
leaks.
corbin
On Feb 18, 2009, at 3:09 PM, John Love wrote:
[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 (Cocoa-dev@lists.apple.com)
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com