http://d.puremagic.com/issues/show_bug.cgi?id=6998

           Summary: std.container.Array destroys class instances
           Product: D
           Version: D2
          Platform: x86_64
        OS/Version: Linux
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nob...@puremagic.com
        ReportedBy: mailm...@nilsb.dyndns.org


--- Comment #0 from Nils <mailm...@nilsb.dyndns.org> 2011-11-23 16:40:00 PST ---
---
class C {
    int i;
}
auto c = new C;
c.i = 42;
Array!C a;
a ~= c;
a.clear;
assert(c.i == 42); // fails
---

Tested with dmd 2.056.
Problem does not arise with structs.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------

Reply via email to