• 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
Re: static objects "autoreleased with no pool in place - just leaking"
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: static objects "autoreleased with no pool in place - just leaking"


  • Subject: Re: static objects "autoreleased with no pool in place - just leaking"
  • From: j o a r <email@hidden>
  • Date: Fri, 13 Feb 2004 14:07:18 +0100

On 2004-02-13, at 13.39, Pete Yandell wrote:

> static NSWhatever* myObject = [[NSWhatever alloc] init];
>
> would work just fine and would avoid the warnings because you're not
> attempting to add the object to an autorelease pool.

This is not at all sure, as the object you allocate might - as part of
it's initialization - itself create autoreleased objects. Something
like this:

- (id) init
{
if ((self = [super init]) != nil)
{
myColor = [[NSColor redColor] retain];
}

return self;
}

j o a r

[demime 0.98b removed an attachment of type application/pkcs7-signature which had a name of smime.p7s]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

References: 
 >static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: j o a r <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: j o a r <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: j o a r <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: j o a r <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: m <email@hidden>)
 >Re: static objects "autoreleased with no pool in place - just leaking" (From: Pete Yandell <email@hidden>)

  • Prev by Date: Re: DictionaryWithContentsOfURL
  • Next by Date: Re: static objects "autoreleased with no pool in place - just leaking"
  • Previous by thread: Re: static objects "autoreleased with no pool in place - just leaking"
  • Next by thread: Re: static objects "autoreleased with no pool in place - just leaking"
  • Index(es):
    • Date
    • Thread