Ideas for runtime loading of shared libraries.

Daniel Murphy yebblies at nospamgmail.com
Thu Mar 7 20:06:24 PST 2013


"Walter Bright" <newshound2 at digitalmars.com> wrote in message 
news:khbloq$284i$1 at digitalmars.com...
> On 3/7/2013 7:22 PM, Walter Bright wrote:
>> On 3/7/2013 6:18 PM, Daniel Murphy wrote:
>>> What if their vtbl points into the dll code?
>>>
>>> What about delegates or function pointers that point there?
>>
>> These are problems with *any* dynamic dll code. The answer is to tell the 
>> user
>> "don't do that". The user should NEVER continue to use objects created by 
>> that
>> dll or delegates/functionpointers/datapointers that refer to it.
>
>
> In essence, dynamically loading/unloading dlls is like calling 
> malloc/free - it cannot be made @safe.

I was thinking about implicit unloading.  If this is actually about explicit 
unloading then it makes sense to just be unsafe. 




More information about the Digitalmars-d mailing list