On 03/08/2013 04:22 AM, Walter Bright wrote:

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.

The gc problem, however, is not tractable for the user, so it must be
dealt with by us, and can be dealt with using the method I described.

Right that's the point.
You wouldn't expect the following code to work either.

auto h = loadLibrary("lib");
auto f = loadFunc(h, "func");
closeLibrary(h);
f();

Reply via email to