Re: Garbage collector vs variable lifetime
Re: Garbage collector vs variable lifetime
- Subject: Re: Garbage collector vs variable lifetime
- From: Ken Thomases <email@hidden>
- Date: Sat, 7 Jun 2008 06:14:06 -0500
On Jun 7, 2008, at 3:41 AM, Quincey Morris wrote:
On Jun 7, 2008, at 00:07, Antonio Nunes wrote:
Although I maybe did not make it that clear, I actually meant my
suggestion also as a question. I'm surprised no-one else suggested
to temporarily turn of garbage collection for this pointer. I'm
curious as to why Bill suggested his solution rather than directly
instructing the garbage collector, since that would seem to me the
more obvious solution. Is Bill's solution preferable in any way?
(After all, I'd like to improve to the level where I know what I'm
doing ;-)
I can think of one significant difference. Using CFRetain/CFRelease
(or your slightly more general equivalent) is a procedural solution
-- you would need to make sure there was a matching release on every
execution path out of the relevant code.
Including in the face of exceptions.
-Ken
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden