Memory management design

bearophile bearophileHUGS at lycos.com
Wed Jul 10 09:04:31 PDT 2013


sclytrack:

> Why not just go manual memory. Just store everything
> in a tree-like structure.
>
> SuperOwner
> --Child1
> --Child2
> ----SubChild1
> ----SubChild2
> ------Container1
> ------Container2
> ------TStringList
>
> Freeing a Child2 disposes of everything below.

Something like this?
http://swapped.cc/?_escaped_fragment_=/halloc#!/halloc

A manual hierarchical allocator is possibly handy to have in 
Phobos. But it doesn't replace a owning scheme for automatic 
memory management.

Bye,
bearophile


More information about the Digitalmars-d mailing list