Re: Is Apple's singleton sample code correct?
Re: Is Apple's singleton sample code correct?
- Subject: Re: Is Apple's singleton sample code correct?
- From: Andreas Mayer <email@hidden>
- Date: Wed, 30 Nov 2005 02:47:10 +0100
Am 30.11.2005 um 02:09 Uhr schrieb David Gimeno Gost:
Either those other objects are also released or they aren't. If
they are, their -dealloc method shall send the required -release
message. If they aren't, that would be a bug in my code,
Not it need not. You do not have control over all objects that get
created during the live time of you app.
Note also that for this to happen to a singleton, it requires that
the object that is retaining it is ignoring the fact that it is a
singleton.
I don't understand. Singletons are treated like any other object in
Cocoa. It's just that you never create one 'by hand' (i.e. alloc/init).
It's best to not fight the framework. To do so will make your life
miserable.
Agreed, but that's not the case.
But you are constantly arguing that each and every object should be
deallocated when the app quits. That's just not the case in Cocoa. If
you try to *make* it so, you *are* fighting the framework.
Andreas (I'm *really* gonna stop now ...)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden