[Issue 6014] rt_finalize Segmentation fault , dmd 2.053 on linux & freebsd
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Sep 14 05:23:01 PDT 2011
http://d.puremagic.com/issues/show_bug.cgi?id=6014
--- Comment #19 from Steven Schveighoffer <schveiguy at yahoo.com> 2011-09-14 05:22:43 PDT ---
(In reply to comment #17)
> There is also a deterministic bug happening due to an oversight in the
> finalization design. Finalization is done in memory order and does not take
> hierarchies into account.
Just to clarify as you discovered in your new bug report, this is by design --
a destructor cannot rely on any heap-allocated data being present.
A concept in many GC-based languages is to have two "destructors", one which is
only ever called synchronously, and one that can be called asynchronously by
the GC. The synchronous one always calls the asynchronous one. This is
sometimes called a finalizer (and in fact, ~this is a finalizer).
--
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