Ticket #15701 (closed defect: fixed)
wxSocketBase::Initialize() fails after wxSocketBase::Shutdown() on MSW
|Reported by:||lpoujoulat||Owned by:|
wxSocketBase::Initialize() fails when called a second time after wxSocketBase::Shutdown() with message "Unknown window class".
The reason is that wxSocketMSWManager::OnExit() unregisters the window class used to create the socket hidden window, but not nullify the static pointer that keeps track of this registration.
When re-initialising, the wxSocketMSWManager::OnInit() code still thinks that the class is already registered and does not re-registers it. This pointer is a static variable inside wxSocketMSWManager::OnInit().
It seems that there is no need for this pointer to be static and should just be volatile.