An idea for GC and freeing of resources without finalization
rikki cattermole
rikki at cattermole.co.nz
Thu Jun 17 10:50:41 UTC 2021
Alternatively we could make scope actually work for us.
With scope as a storage class we can assume that there is an owning
point on the stack for a give handle (the language nor druntime is aware
of the handle itself).
When that owning point goes out of scope, either the container gets
destroyed or an operator overload gets called saying scope ends now!
Along with another operator overload that allows you to return a
seperete reference to that handle when you try to escape scope, done!
More information about the Digitalmars-d
mailing list