how to create an array of scoped objects ?

Flaze07 christianseiji.cs at gmail.com
Tue Jul 3 16:26:31 UTC 2018


On Tuesday, 3 July 2018 at 15:06:28 UTC, Mike Parker wrote:
> ..
> That said, the GC in D runs when main exits anyway, so the 
> destructor in your example will be called. That's why I warned 
> earlier about it being nondeterministic. For example, if you 
> have a Texture instance that depends on the context of the 
> RenderWindow, but the RenderWindow's destructor runs first, you 
> could potentially see a crash on exit depending on the 
> implementation of DSFML, SFML, and the system graphics driver.

I see, so that's what you meant, thank you


More information about the Digitalmars-d-learn mailing list