best way to "reset" values
best way to "reset" values
- Subject: best way to "reset" values
- From: Daniel Child <email@hidden>
- Date: Sat, 01 Sep 2007 12:00:24 -0400
Hi All,
As I grapple with the whole memory management issue, a question I
haven't seen explicitly addressed is now to reset ivars to default
(empty) values.
As far as I understand, if I use
[self setMyString: @""];
then the @"" is a constant that can never be freed. Or is that OK? (I
need to reset the value often, and don't want to leak memory.) Also,
is the approach different if the ivar is a collection (set, array,
dictionary...)?
Thanks.
Daniel
_______________________________________________
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