[Issue 11952] New: struct field initialization with postblit causes un-needed destruction
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sun Jan 19 12:50:43 PST 2014
https://d.puremagic.com/issues/show_bug.cgi?id=11952
Summary: struct field initialization with postblit causes
un-needed destruction
Product: D
Version: unspecified
Platform: All
OS/Version: All
Status: NEW
Severity: enhancement
Priority: P2
Component: DMD
AssignedTo: nobody at puremagic.com
ReportedBy: monarchdodra at gmail.com
--- Comment #0 from monarchdodra at gmail.com 2014-01-19 12:50:41 PST ---
Given a struct "B" with a field "sup" of type "A", where "A" has a postblit.
Then intialization "sup" triggers a postblit (good), but also destroys the
prior value of "sup" (useless).
Just the way we can avoid "assign" on first initialization, postblit
destruction should be avoided as well.
>From learn:
http://forum.dlang.org/thread/xfmqyplfxmdmrnotdzil@forum.dlang.org
In the thread, the user see a wrong amount of reference counts because of this
issue.
--
Configure issuemail: https://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list