On 1/4/18 6:50 AM, thedeemon wrote:
On Thursday, 4 January 2018 at 11:05:25 UTC, tipdbmp wrote:

It seems that the '~=' operator "knows" that there's a reference to 'a's old memory and it keeps it around instead of freeing it.

It's just not its job to free that memory. That memory is freed later by GC, when it's safe to do so.

Yeah, to further clarify, the array runtime has no idea who is looking at the memory. It doesn't "know" about references, it just relies on the GC to clean up the garbage if it actually is garbage.

-Steve

Reply via email to