| Article: |
Variables Inside Cocoa Objects | |
| Subject: | Setter example | |
| Date: | 2002-04-13 17:22:14 | |
| From: | shiny | |
|
Hi,
|
||
Showing messages 1 through 1 of 1.
-
Re: Setter example
2002-04-14 10:06:35 bdominy [View]
|
|
||||||||||||||||||
Women in TechnologyHear us Roar
Showing messages 1 through 1 of 1.
|
||||||||||||||||||
|
||||||||||||||||||
You are quite correct that one of your suggested means of releasing the existing mystring should have been used when making the new assignment to avoid memory leaks. I can only claim that I was trying to use the minimum amount of code to keep all of the concepts clear and I didn't want to introduce the issues concerning memory management and Objective-C. But, for completeness you are absolute correct and I will add this to future examples.
Brad