GC Destruction Order

Kagamin via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed May 20 01:01:44 PDT 2015


On Tuesday, 19 May 2015 at 22:15:18 UTC, bitwise wrote:
> Thanks for confirming, but given your apparent tendency toward 
> pinhole view points, it's unsurprising that you don't 
> understand what I'm asking.

And what you're asking. Just for the record: C++ memory 
management techniques are not designed to work in GC environment.

On Wednesday, 20 May 2015 at 03:44:58 UTC, bitwise wrote:
> Basically, I can't design a struct and be sure the destructor 
> will be called on the same thread as where it went out of scope.

If your resource finalization code has some specific threading 
requirements, you implement those yourself in a way your code 
requires it. Or instead freeing resources normally in due time.


More information about the Digitalmars-d-learn mailing list