advertisement

Article:
  Variables Inside Cocoa Objects
Subject:   Setter example
Date:   2002-04-13 17:22:14
From:   shiny
Hi,


Thanks for your timely article on AppleScript and Cocoa. I found your article very informative and enjoyable.


Just a minor point. Your setter example causes some problems such as memory leak. Your code


mystring = str;


should've been


[mystring autorelease]; or [mystring release];
mystring = [str copy]; or mystring = [str retain];


Thanks again for your article. I'm looking forward to reading your next one.


shin


1 to 1 of 1
  1. Re: Setter example
    2002-04-14 10:06:35  bdominy [View]

1 to 1 of 1