[Geany] Unloading modules (was Re: Plugin keybindings support in SVN)

Nick Treleaven nick.treleaven at xxxxx
Thu Mar 13 13:10:37 UTC 2008


On Thu, 13 Mar 2008 04:43:54 -0500
"Jeff Pohlmeyer" <yetanothergeek at gmail.com> wrote:

> Also (slightly off topic) I noticed that the htmlchars
> plugin behaves badly when it is unloaded/reloaded from
> the plugin manager.
> 
> It needs this line at the end of cleanup()
> +  sc_dialog = NULL;

Thanks, this might reveal some similar problems in other plugins. Since
the plugin manager was added, it seems each GModule is loaded at
startup, but not initialized. This means each plugin's global variables
are only initialized at startup, not when they are enabled.

To solve this problem, it might be best to unload each module after
reading the information for each plugin - this would be good to do
anyway to save memory. Otherwise, the shared library must stay
resident. Each plugin's metadata could be cached by Geany.

Regards,
Nick



More information about the Users mailing list