Am 31.12.2012 13:14, schrieb Sven Over:

A smart-pointer type for arrays can easily provide slices. It keeps a
reference to the full array (which gets destructed when the last
reference is dropped), but addresses a subrange.

I did exactly implement this in https://github.com/Ingrater/druntime/blob/master/src/core/refcounted.d Basically I implemented a struct that mimics a regular D array as far as possible, but it is using reference counting under the hood.

Kind Regards
Benjamin Thaut

Reply via email to