http://d.puremagic.com/issues/show_bug.cgi?id=11311
Summary: [REG 2.064] Destructor not called on temporary with
opIndex + opSlice
Product: D
Version: D2
Platform: All
OS/Version: All
Status: NEW
Severity: regression
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Benjamin Thaut <[email protected]> 2013-10-21 03:02:07
PDT ---
Created an attachment (id=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.
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------