Re: NSTextField "setStringValue" method - deallocates?
Re: NSTextField "setStringValue" method - deallocates?
- Subject: Re: NSTextField "setStringValue" method - deallocates?
- From: Michael Vannorsdel <email@hidden>
- Date: Sat, 14 Jun 2008 21:44:22 -0600
In short yes. The long answer is the textfield will release the
string when it's done with it and if no one else retained the string
it will be deallocated.
On Jun 14, 2008, at 9:35 PM, Christopher J Kemsley wrote:
I'm new to Obj-C, and I'm trying to make sure I start off writing
good code so I don't have to come back and learn how to avoid dirty
code and/or memory leaks.
That being said, if I do the following:
NSString *someString = [ NSString stringWithString:@"Hello World!" ] ;
[ someNSTextField setStringValue:someString ] ;
Does the NSTextField take care of de-allocating the memory from the
old value by itself?
_______________________________________________
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