GC operates in LIFO sequence?

Swoorup Joshi via Digitalmars-d digitalmars-d at puremagic.com
Wed Aug 9 10:38:15 PDT 2017


On Wednesday, 9 August 2017 at 15:47:17 UTC, Guillaume Piolat 
wrote:
> On Wednesday, 9 August 2017 at 13:46:29 UTC, MGW wrote:
>> Memory allocation and deallocation when an application is 
>> being completed in GC operates in FIFO sequence.
>> Is there a possibility to shift GC memory deallocation to LIFO 
>> mode?
>>
>> It`s connected with the fact that GUI library (Qt) creates 
>> QApplication first,
>> but GC destroys this object first when an application is being 
>> completed. This leads to the application failure.
>> If the sequence of memory deallocation on LIFO is shifted, it 
>> will essentially simplify the cooperation with C++ libraries.
>
> https://p0nce.github.io/d-idioms/#The-trouble-with-class-destructors

Is garbage collection even useful besides managing memory?


More information about the Digitalmars-d mailing list