Has AA a bad implementation?
frame
frame86 at live.com
Fri Feb 12 20:35:40 UTC 2021
On Friday, 12 February 2021 at 12:48:30 UTC, welkam wrote:
> There can be slices that point to the memory owned by this
> array so you cant just free it. If you want manually manage the
> memory then you should look at dub for different containers.
The array is overwritten with 0 so any pointers are lost anyway.
Yeah, I can use any element I want. But my problem is that any
thirdparty code may not care about. In any static context it
produces leaks. This behavior is not documented - anyone thinks
that clear() means clear, not: fill with 0.
In some context it's needed to reduce memory. As a standard
element it should at least have an explicit ability to free
memory when it's really desired.
More information about the Digitalmars-d
mailing list