[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: OSX and loadlib
- From: Wesley Smith <wesley.hoke@...>
- Date: Wed, 4 Mar 2009 14:12:09 -0800
you're right although perhaps the apple people working on CoreMidi
didn't get the memo. When I made a lua module with CoreMidi dlopen
caused crashes when the module was reloaded, but NSLoadModule didn't.
wes
On Wed, Mar 4, 2009 at 2:04 PM, Sam Roberts <vieuxtech@gmail.com> wrote:
> On Wed, Mar 4, 2009 at 1:23 PM, Wesley Smith <wesley.hoke@gmail.com> wrote:
>> Actually dlopen is not ideal on OSX. It wreaks havoc with
>> CoreAudio/CoreMidi type frameworks whereas NSLoadModule functions
>> behave appropriately. From what I remember reading the tech docs,
>> they highly recommended NSLoadModule over dlopen and from my
>> experience this is sage advice.
>
> Apple's developer docs claim use of NSLoadModule is discouraged in
> preference to dlopen:
>
> http://developer.apple.com/DOCUMENTATION/DeveloperTools/Reference/MachOReference/Reference/reference.html
> http://developer.apple.com/releasenotes/DeveloperTools/RN-dyld/index.html
>
> Not that Apple's advice necessarily applies to every circumstance.
>
> Cheers,
> Sam
>