Created attachment 1272
repro case
The attached repro case will print:
452fc0 => 1
452fc0 => 2
453fc0 => 1
452fc0 => 1
before bar
453fc0 => 2
453fc0 => 1
after bar
453fc0 => 0
on dmd 2.063 and before. On dmd 2.064 (latest git head) it will print:
1c02fc0 => 1
1c02fc0 => 2
1c03fc0 => 1
1c02fc0 => 1
before bar
1c03fc0 => 2
after bar
1c03fc0 => 1
This causes numerous memory leaks when using ref-counting for memory
management. It seems that the temproary object which is returned from getObj()
will never be destructed.