> On Oct 23, 2014, at 3:26 PM, Kyle Sluder <[email protected]> wrote:
> 
>> On Thu, Oct 23, 2014, at 05:06 PM, Greg Parker wrote:
>> 
>> The initialization order is generally like this:
>> 1. Everything in libraries you link to is initialized.
>> 2. Your classes' +load methods run. Each class runs +load before its
>> subclasses. (Timing of category +load is more complicated, but in most
>> cases they also run now.)
>> 3. Your C and C++ static constructors run.
>> 4. main()
> 
> Is it accurate to say that Objective-C +initialize methods happen, at
> the earliest, as part of Step 3?

No. If a +load method calls another method then it will provoke +initialize at 
that time. (This includes messages to that +load's own class.)


-- 
Greg Parker     [email protected]     Runtime Wrangler



_______________________________________________

Cocoa-dev mailing list ([email protected])

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to