Re: Beginner memory management question

2008-12-04 Thread Scott Ribe
A few things to note: As was already pointed out, you meant if(newName != nil) [newName release], but note that it's not an error to send a message to nil (as long as you're not using a return value, then there are rules as to whether it's safe or not), so you could just do [newName release].

Beginner memory management question

2008-12-03 Thread Jacob Rhoden
I am not sure how one would go about working this, Im writing my first test os/x applications and I am thinking this is probably not right. Am I doing the retain in the correct place? I tried reading the documentation on NSTextField but it didnt give me a clue about if I needed to retain.

Re: Beginner memory management question

2008-12-03 Thread Nick Zitzmann
On Dec 3, 2008, at 3:13 AM, Jacob Rhoden wrote: I am not sure how one would go about working this, Im writing my first test os/x applications and I am thinking this is probably not right. Am I doing the retain in the correct place? Yes, but that's not your problem. I tried reading the

Re: Beginner memory management question

2008-12-03 Thread Luke Hiesterman
What you should do is declare newName as a property and then do self.newName = [stockName stringValue]; The synthesized property will take care of retaining and releasing for you. Luke Sent from my iPhone. On Dec 3, 2008, at 2:13 AM, Jacob Rhoden [EMAIL PROTECTED] wrote: I am not sure