just glanced over the patch.
void PluginManager::AddUnloadedPluginElem(const wxString &path, const PluginInfo &info)
{
PluginElement *plugElem = new PluginElement;
plugElem->fileName = path;
plugElem->info = info;
plugElem->library = 0;
plugElem->freeProc = 0;
plugElem->plugin = 0;
m_Plugins.Add(plugElem);
}
I would prefer nullptr instead of 0. At other places in the patch as well.
The method name AddUnloadedPluginElement reveals, that it is doing actually 2 things:
Creating a PluginElement and adding it. To me, the creation details belong to PluginElement.
I'd convert it into a ctor or maybe into a static method to give it a name like:
static PluginElement PluginElement::unloaded(const wxString &path, const PluginInfo &info);
That way, the void method wil evaporate into a mere call :
m_Plugins.Add( new PluginElement::unloaded(path, info));
where at least the creation is more exception safe and the newly created element is given
directly to the array. I always shiver when I see naked new and delete.