On 1/31/13 11:12 AM, Robert burner Schadek wrote:
struct Deque(T) { struct Payload { T* array; size_t head, size; size_t ref; }Payload* load; ~this() { if(load !is null && (load.ref-=1) == 0) { free(load); } }
Yes, that's the general pattern. I agree it's a pain but I also understand that library containers are not required to look like casual application code.
Andrei
