Help with Win32: PostQuitMessage(0) doesn't post WM_QUIT apparently, because the message loop is not exited.

Ruby The Roobster michaeleverestc79 at gmail.com
Fri Aug 13 21:36:35 UTC 2021


On Friday, 13 August 2021 at 19:59:46 UTC, Mike Parker wrote:
> You aren't supposed to be manipulating GC-managed memory via 
> class destructors. You can not rely on that memory being valid 
> at the time that it's accessed in the destructor---the object 
> may already have been destroyed. Nondeterministic destruction 
> is the price you pay for letting the GC manager your object 
> memory.
>
> Of course, in this case, the problem will only crop up at 
> termination since the array is declared at module scope so will 
> be live up until the GC shuts down. But still, not something 
> you should be doing.
>...

Thank you very much.  The program runs successfully now.


More information about the Digitalmars-d-learn mailing list