http://bugs.winehq.org/show_bug.cgi?id=8301
------- Additional Comments From vitaliy@kievinfo.com 2007-13-05 10:21 ------- This is chicken and an egg problem. If application did not destroy all of the objects, you should not be able to just unload the dll. BTW it could be not jut a loader, bot OLE telling to unload the DLL without doing any checks. And loader doing exactly that, again without doing any checks.
However there is a race in this code. Window doesn't get destroyed before owning thread exits and dll unloaded. I will see what I can do about this.