Question about destructor of database and multiple use access

Lodovico Giaretta via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Thu Jul 28 09:02:51 PDT 2016


On Thursday, 28 July 2016 at 15:24:22 UTC, Dechcaudron wrote:
> On Thursday, 28 July 2016 at 15:18:24 UTC, Lodovico Giaretta 
> wrote:
>> 3) at program end, live objects are not scheduled for 
>> finalization;
>> 4) at program end, pending finalizations from previous 
>> collections may not be run.
>
> I didn't know these two, can I get source on them?

I don't have any specific knowledge about the D collector, but it 
is my understanding that most collectors out there work this way, 
because it would be very expensive and bug-prone to do otherwise 
(remember that destructors may do things like get stuck in a loop 
or "resurrect" themselves or other collected objects).

> Also, I'm assuming what I said about calling destroy(instance) 
> is as correct as calling a cleanup method?

Yes, I think so.


More information about the Digitalmars-d-learn mailing list