Otherwise, accessing the runtime variable seems ok to me like the link said, hacky sure, but it'd work.... nothing else comes to mind, other than using a separate dispose() method when you delete it manually and leave the dtor for only the GC.
Re: Clean way to tell whether a destructor is called by the GC
Adam D. Ruppe via Digitalmars-d-learn Tue, 12 May 2015 05:36:11 -0700
Let me suggest a completely different option: make a destructor
that works while the GC is running by managing the resources
manually in both construction and destruction. Remember, it isn't
*all* reference types that are problematic to access, it is just
GC managed references. So anything from a C function is cool.
- Clean way to tell whether a destruct... ponce via Digitalmars-d-learn
- Re: Clean way to tell whether a... Adam D. Ruppe via Digitalmars-d-learn
- Re: Clean way to tell wheth... ponce via Digitalmars-d-learn
- Re: Clean way to tell w... Kagamin via Digitalmars-d-learn
- Re: Clean way to te... ponce via Digitalmars-d-learn
- Re: Clean way ... Kagamin via Digitalmars-d-learn
- Re: Clean way ... Kagamin via Digitalmars-d-learn