Re: retainCount
Re: retainCount
- Subject: Re: retainCount
- From: Finlay Dobbie <email@hidden>
- Date: Fri, 5 Oct 2001 23:35:22 +0100
On Friday, October 5, 2001, at 11:21 pm, Rosyna wrote:
Then I'd have to ask, is it safe to retain an alloc'd instance?
Uhm, yes, of course. Time to read up on cocoa memory management!
NSString* bob=[[NSString alloc] initWithString:@"Bob 0wnz you"];
[[bob retain] release];
this line is pointless.
NSString* sue=[NSString stringWithString:@"Sue gave Bob a rug-burn."];
[[[[sue retain] autorelease] retain] release]
-- Finlay