https://issues.dlang.org/show_bug.cgi?id=12915

--- Comment #4 from safety0ff.bugz <[email protected]> ---
(In reply to Steven Schveighoffer from comment #3)
> We certainly can null pointers as the nodes are deallocated. But the tree
> does not go through and destroy all the nodes if you just forget the tree
> (and I would argue it shouldn't).

Clear simply resets the begin & end pointers.

> So this may solve the specific use case, but not the general one.

The general case is only solved by precise GC.

We can only help specific use cases:
- Nulling on element removal.
- Manually specified complete destruction.
etc.

--

Reply via email to