Re: Nevermind
Re: Nevermind
- Subject: Re: Nevermind
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 5 Nov 2001 13:32:46 -0800
On Monday, November 5, 2001, at 12:55 PM, Dan Huntsinger wrote:
I just realized that my last message about NSImage initialization was
pretty
dumb. I think I found my problem. The "title" string that I'm
releasing
was never actually allocated, and so doesn't need releasing, hence the
access error and crash. I guess was treating the "pathForImageResource"
method like a convenience constructor for the string, when it is not.
Please correct me if I'm wrong.
To be precise: it *was* allocated, but it was also autoreleased by the
NSBundle method that created it. The rule is, if *you* alloc, retain or
copy something, then you have to release it.
-jcr
"This is not a book to be tossed aside lightly. Rather, it should be
hurled with great force." -Dorothy Parker
References: | |
| >Nevermind (From: Dan Huntsinger <email@hidden>) |