Re: Enabling NSZombieEnabled programatically
Re: Enabling NSZombieEnabled programatically
- Subject: Re: Enabling NSZombieEnabled programatically
- From: "Stephen J. Butler" <email@hidden>
- Date: Sun, 10 Jan 2010 00:53:58 -0600
On Sun, Jan 10, 2010 at 12:36 AM, Ron Fleckner
<email@hidden> wrote:
> OK, thanks Dave and Stephen. I think I'll have to find some documentation
> which lists the order of function calls at app startup, though, because the
> documentation for +load doesn't specifically say anything about app startup,
> just class initialization, which I'm assuming is a different process. In
> fact, my uninformed guess is that class initialization would come more or
> less last in the process of starting an application. But, that's now my job
> to find out if I can.
GCC documentation helps here. For functions with the constructor attribute:
<http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Function-Attributes.html#Function-Attributes>
""The constructor attribute causes the function to be called
automatically before execution enters main (). Similarly, the
destructor attribute causes the function to be called automatically
after main () has completed or exit () has been called. Functions with
these attributes are useful for initializing data that will be used
implicitly during the execution of the program.
These attributes are not currently implemented for Objective-C. ""
For Objective-C:
<http://gcc.gnu.org/onlinedocs/gcc-4.0.4/gcc/Executing-code-before-main.html#Executing-code-before-main>
""The GNU Objective-C runtime provides a way that allows you to
execute code before the execution of the program enters the main
function. The code is executed on a per-class and a per-category
basis, through a special class method +load.""
_______________________________________________
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