FROM : Hamish Allan
DATE : Thu Jan 24 19:37:33 2008
On Jan 24, 2008 5:23 PM, Ian was here <<email_removed>> wrote:
> I have an interesting issue. I noticed that when I
> make an object a Nib file's owner, that my object's
> retain count increases by one. So, when I release my
> object, it doesn't get deallocated. I found that the
> following code works. I was just wondering if there
> was a better way.
The first thing you should do is try to find out why you get a crash
if you don't call [self retain] in your dealloc method. Because why
would you expect an object ever to get deallocated if you're
explicitly asking for it not to be in the very method that is supposed
to be doing so?!
Hamish
DATE : Thu Jan 24 19:37:33 2008
On Jan 24, 2008 5:23 PM, Ian was here <<email_removed>> wrote:
> I have an interesting issue. I noticed that when I
> make an object a Nib file's owner, that my object's
> retain count increases by one. So, when I release my
> object, it doesn't get deallocated. I found that the
> following code works. I was just wondering if there
> was a better way.
The first thing you should do is try to find out why you get a crash
if you don't call [self retain] in your dealloc method. Because why
would you expect an object ever to get deallocated if you're
explicitly asking for it not to be in the very method that is supposed
to be doing so?!
Hamish
| Related mails | Author | Date |
|---|---|---|
| Ian was here | Jan 24, 18:23 | |
| Hamish Allan | Jan 24, 19:37 | |
| Keary Suska | Jan 24, 19:39 | |
| Ian was here | Jan 24, 21:48 | |
| Hamish Allan | Jan 24, 22:30 | |
| Keary Suska | Jan 24, 23:01 | |
| Ken Thomases | Jan 25, 17:56 | |
| Keary Suska | Jan 27, 17:53 |






Cocoa mail archive

