Ticket URL: <
http://trac.wxwidgets.org/ticket/14261#comment:7>
#14261: wxPluginLibrary::RestoreClasses() throws an exception if unloaded in wrong
order
-----------------------------+----------------------------------------------
Reporter: manyleaves | Owner:
Type: defect | Status: confirmed
Priority: normal | Milestone:
Component: base | Version: 2.9-svn
Keywords: wxPluginLibrary | Blockedby:
Patch: 0 | Blocking:
-----------------------------+----------------------------------------------
Changes (by vadz):
* status: new => confirmed
Comment:
Sorry, I didn't have time to look at the attachment. Understanding other
people code simply takes more time than I can afford, this is why I always
ask to explain the problem in a simple way or provide a minimal
[HowToSubmitPatches patch to a sample].
Anyhow, yes, if you need to register `wxModule`s dynamically, you must
indeed use `wxPluginLibrary` so it would be nice to fix this.
Unfortunately I'm afraid it's not as simple as your patch.
`wxPluginLibrary::ms_classes` is used by `wxIMPLEMENT_PLUGGABLE_CLASS()`
in `wx/object.h`. To be honest I have no idea how does this work and there
is no documentation for these macros but it seems clear that removing
`ms_classes` would break this. So either these macros should be removed as
well -- if we consider that they're useless -- or `wxPluginLibrary` should
be fixed to work correctly independently of the unload order. If you can
look at this in more details and explain what do you think should be done,
it would be very helpful.
TIA!
--
Ticket URL: <
http://trac.wxwidgets.org/ticket/14261#comment:7>