Re: Factory AutoRelease
Re: Factory AutoRelease
- Subject: Re: Factory AutoRelease
- From: sinclair44 <email@hidden>
- Date: Sun, 04 May 2003 17:56:02 -0400
On 5/4/03 5:45 PM, "Bryan Rieger" <email@hidden> wrote:
>
How can you tell if an object created by a class factory method calls
>
autorelease on an object before it returns it to the caller. ie
>
>
myScanner = [NSScanner scannerWithString: aString];
>
>
is myScanner already in the autorelease pool?
Yes. The general rule is that if you didn't +alloc or -copy it, you don't
need to release it. (It *ISN'T* necessarily autoreleased!)
--
-- sinclair44
[self becomeWorldDictator];
- (void)becomeWorldDictator
{
[self coverLegalButt];
[[GeorgeBush principalClass] assassinate:[world currentLeaders]];
[[BinLaden principalClass] terrorize:[world citizens]];
[world setCurrentLeaders:[NSArray arrayWithObject:self]];
}
- (void)coverLegalButt
{
/* The above does not reflect any plans, expressed or implied, real or
imaginative, to kill or assassinate anyone, or to harm anyone in any shape,
way or form. Any relation to actual events is purely coincidental. */
}
_______________________________________________
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.