[Issue 4621] Destructors are inherently un- at safe
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Aug 11 11:37:53 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4621
--- Comment #2 from Michel Fortin <michel.fortin at michelf.com> 2010-08-11 14:37:52 EDT ---
Perhaps a better solution for structs: have a way to distinguish between a
struct that can be put on the GC heap and one that cannot. A struct that cannot
go on the GC heap make it safe to access GC-managed members in its destructor,
and thus can have a @safe destructor.
But at the same time such a struct would be prohibited at compile time from
being part of a class, or from being allocated with "new" (either solitary or
part of an array).
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list