• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Memory Leak, part I
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: Memory Leak, part I
      • From: Corbin Dunn <email@hidden>
    • Re: Memory Leak, part I
      • From: James Montgomerie <email@hidden>
  • Prev by Date: Re: How to force a message to a overriding method from within an init method
  • Next by Date: Large layers in Core Animation
  • Previous by thread: Getting a Unique File ID from MDItem
  • Next by thread: Re: Memory Leak, part I
  • Index(es):
    • Date
    • Thread