Re: self release
Re: self release
- Subject: Re: self release
- From: "John C. Randolph" <email@hidden>
- Date: Mon, 12 May 2003 11:01:50 -0700
On Monday, May 12, 2003, at 10:26 AM, Wolfgang Ante wrote:
Is it OK to "[self release]"?
The only time I've had occasion to do so was in an -init method,
where initialization failed and I needed to avoid leaking memory.
Other than such a situation, sending -release to self is very >> unusual.
Yes, I have noticed that!
Well, my idea is to have a quite independent object that does things
in the background (and is kept alive either with timers or with
threads) and when it is finished it kills itself.
Like writing something like...
[[[MyWorkingBee alloc] initWithWorkDesc:info] runInBackground];
...and then not caring about it any more.
Bad idea?
No, that's quite alright. Just keep in mind that it's an unusual thing
to do.
-jcr
John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.