On 2013-03-08 01:17, Walter Bright wrote:
D doesn't guarantee that finalizers will run on GC allocated objects.
Therefore, when unloading a dll:
1. run a gc collection
2. for all objects remaining on the heap
if they have a finalizer and that finalizer points into the dll
code
mark them as not having a finalizer
Could we do something like I suggested in another post:
We could create a standard plugin interface in Phobos or druntime,
something like:
interface Plugin
{
void initialize ();
void terminate ();
}
Every plugin should implement this directly or indirectly. "initialize"
would be called just after the plugin is loaded and "terminate" would be
called just before unloading.
The plugin would then have a possibility to cleanup after itself.
--
/Jacob Carlborg