Comment 3 for bug 1193596

Revision history for this message
Sam Spilsbury (smspillaz) wrote :

Additional note: allowing the destructors to create new instances isn't a problem - a new instance will only be created if a plugin class instance didn't already exist for that particular core structure.

Calling PluginWindow::get (w) inside of a PluginScreen destructor is more or less undesired behavior anyways - previously it would just result in ::get returning NULL (which by convention, is never checked), now the behavior is undefined. The proper solution is probably to have a "mark no further instantiations" phase for each attachable class (eg, PluginWindow::markNoFurtherInstantiations, PluginScreen::markNoFurtherInstantiations), but just delaying the marking until the end of the unload process is good enough for now.