finetjul/CTK — comment on commit bc689a0f10d0944a4ab309318cc7e134f66a1621
File: Libs/Core/ctkAbstractPluginFactory.tpp line 68
By saschazelzer:

In the PluginFramework I considered unloading a Qt plug-in too. Just for
your information, this is my comment (in ctkPluginPrivate.cpp)
concerning the unloading of a plugin:

// This would unload the shared library and delete the activator (root
component) if
// there are no dependencies. However, objects from the plug-in might
// have been created via C-function symbol lookups. Hence we cannot
// safely unload the DLL. Maybe implement a in-DLL counter later
// (http://stackoverflow.com/questions/460809/c-dll-unloading-issue and
//
http://boost.2283326.n4.nabble.com/shared-ptr-A-smarter-smart-pointer-proposal-for-dynamic-libraries-td2649749.html).
// The activator itself will be delete during program termination
// (by the QPluginLoader instance).
//pluginLoader.unload();

On 02/22/2012 05:56 PM, Julien Finet wrote:
> Good call, it's even better to unload than to manually delete:
> from doc: "Don't try to delete the root component"
>
> ---
> Reply to this email directly or view it on GitHub:
> https://github.com/finetjul/CTK/commit/bc689a0f10d0944a4ab309318cc7e134f66a1621#commitcomment-996831