[Issue 20379] Cannot destroy associative arrays AAs (Destructor not called on values)

d-bugmail at puremagic.com d-bugmail at puremagic.com
Mon Sep 20 14:02:41 UTC 2021


Steven Schveighoffer <schveiguy at gmail.com> changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
                 CC|                            |schveiguy at gmail.com
         Resolution|---                         |INVALID

--- Comment #1 from Steven Schveighoffer <schveiguy at gmail.com> ---
I think this needs to be marked invalid.

An AA can provide reference to its values, which is why removing the key
doesn't destroy the value.

The same thing happens for dynamic arrays. Destroy the array, and it basically
just sets it to null.

Same thing with a pointer, destroying it just sets it to null.

While maybe not desirable, it is consistent behavior.


More information about the Digitalmars-d-bugs mailing list