RE: { Semi-Newbie } Inverse of +initialize?
RE: { Semi-Newbie } Inverse of +initialize?
- Subject: RE: { Semi-Newbie } Inverse of +initialize?
- From: "Jeff Evans" <email@hidden>
- Date: Fri, 11 Oct 2002 17:15:34 -0500
I don't know of one method in particular, but you could decrement an
internal count of object you've created in your dealloc method, and when it
gets to zero, perhaps then release your static variables?
Hope this helps,
Jeff
>
-----Original Message-----
>
From: email@hidden
>
[mailto:email@hidden]On Behalf Of Richard Kendall
>
Wolf
>
Sent: Friday, October 11, 2002 4:45 PM
>
To: email@hidden
>
Subject: { Semi-Newbie } Inverse of +initialize?
>
>
>
Just curious ... is there any sort of an inverse of the +initialize
>
factory method? ... something like +cleanup? ... a factory method that
>
will be called for every class, say, just before an application
>
terminates? ... so that the class can deallocate any private data
>
pointed to by static variables?
>
>
I mean, I know it doesn't matter because the data will be freed anyway
>
when the application terminates ... it just rubs me the wrong way that
>
I can allocate storage in +initialize, but there is no way I can think
>
of to explicitly deallocate it other than use an NSApplication delegate
>
to free the data when a user quits the app ... or explicitly when the
>
application is a Foundation tool.
>
_______________________________________________
>
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.
_______________________________________________
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.