Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to load my framework programatically ?





Am 25.05.2006 um 15:58 schrieb rohit dhamija:
Hi Jonathon
I'm not sure what you mean here; can you give an example of an
initialize/terminate routine?

intialize and terminate routines are the constructors and desctructors that
get called up when a framework is loaded and unloaded

There is no such functionality. I hardly can imagine any reason why there should be such stuff, either.


Constructors and destructors of classes should work as expected, in case you use C++.


Am 25.05.2006 um 16:34 schrieb rohit dhamija:

My application runs as a deamon that loads the framework.

If you link or weak link against a framework, dyld will do that for you. No need to duplicate what already works.


But the issue was that when my deamon starts, it loads the framework, but as
soon as the its parent process get kills, the framework gets unloaded.

What makes you think this is true?

If you link your app against a framework or load this framework dynamically later, this framework will be mapped into your app's address space. If the parent process does the same, the parent process gets it's own copy.

If you fork a child, the child gets it's own copy of what the parent has. If the parent terminates later, this doesn't affect the child (short of zombie issues).


Is it the correct way ?

I think it would be a good idea to build plain applications, possibly starting with one of Xcode's templates. In general, one doesn't have to think much about loading/linking issues. This stuff just works as is and changing the way it works is asking for trouble.



Markus

- - - - - - - - - - - - - - - - - - -
Dipl. Ing. Markus Hitter
http://www.jump-ing.de/




_______________________________________________ Do not post admin requests to the list. They will be ignored. Xcode-users mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/xcode-users/email@hidden

This email sent to email@hidden
References: 
 >How to load my framework programatically ? (From: "rohit dhamija" <email@hidden>)
 >Re: How to load my framework programatically ? (From: Jonathon Mah <email@hidden>)
 >Re: How to load my framework programatically ? (From: "rohit dhamija" <email@hidden>)
 >Re: How to load my framework programatically ? (From: "Peter O'Gorman" <email@hidden>)
 >Re: How to load my framework programatically ? (From: "rohit dhamija" <email@hidden>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.