https://code.dlang.org/packages/memutils
The MemUtils package offers a `ScopedPool` utility that seems
interesting. It isn't well documented however so I have no idea
if it actually works like I expect. I presume this would work
something akin to a VM memory snapshot/rollback for the GC? It
would be pretty handy for some scenarios, say a serialization
library. You specify a snapshot point (add a pool to the
stack?), incur all your GC allocations necessary for generating
the structure of your serialized data (which go into the pool
instead of the GC proper?), then you write it to disk and pop the
stack, effectively rolling back to the original memory state of
your program's GC. As long as you make sure not to leak anything
allocated within that phase, seems like a good deal.
- Re: How to use destroy and free. Mike Parker via Digitalmars-d-learn
- Re: How to use destroy and free. Alain De Vos via Digitalmars-d-learn
- Re: How to use destroy and f... H. S. Teoh via Digitalmars-d-learn
- Re: How to use destroy and f... Ali Çehreli via Digitalmars-d-learn
- Re: How to use destroy and f... Mike Parker via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... Mike Parker via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... Mike Parker via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... cc via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... cc via Digitalmars-d-learn
- Re: How to use destroy and f... Ali Çehreli via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... H. S. Teoh via Digitalmars-d-learn
- Re: How to use destroy and f... forkit via Digitalmars-d-learn
- Re: How to use destroy and f... H. S. Teoh via Digitalmars-d-learn
- Re: How to use destroy and free. Tejas via Digitalmars-d-learn