Re: [Gc] Two-phase finalization?
Florian Weimer <[email protected]> Sun, 08 Nov 2015 22:23:43 +0100
| Newsgroups | gmane.comp.programming.garbage-collection.boehmgc |
|---|---|
| Message-ID | <[email protected]> |
* David Kastrup: > Now the problem we encounter is that if some structure A points to B and > some structure B points to A and both A and B are placed into > finalization, then the finalization of A will delete the associated C++ > structure. If now a mark pass is allowed through B, it will try to > access the deleted C++ structure of A. > > Topological ordering will not do the trick since cyclical references are > quite typical (a NoteHead has a reference to the corresponding Stem, a > Stem has references to all corresponding NoteHeads). Have all of them corresponding C++ objects? Do you want the garbage collector to devise a safe deallocation order, or does deallocation happen by another mechanism?