What's the best way to release objective-c properties?
Posted
by mkraken
on Stack Overflow
See other posts from Stack Overflow
or by mkraken
Published on 2010-03-19T15:29:39Z
Indexed on
2010/03/19
15:31 UTC
Read the original article
Hit count: 248
I'm new to memory-management, and am reading different things about how to best release properties.
If I have:
in .h:
@property(retain) NSString *myStr;
and in .m:
@synthesize myStr = _iVarStr;
Should my dealloc have:
[_iVarStr release];
or
self.myStr = nil;
or something else?
Thanks!
© Stack Overflow or respective owner