Garbage collection/finalizers
Andreas Rottmann <[email protected]> Sun, 17 Oct 2004 15:41:36 +0200
| Newsgroups | gmane.lisp.scheme.pika.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi! I just wondered about how strings should be garbage collected; currently, only the vtable object is reclaimed, but the udstr object stays around forever. Clearly, we need a finalizer for string objects. According to [0], finalizers should be implemented with weak references: [0] http://lists.gnu.org/archive/html/pika-dev/2004-05/msg00024.html ,---- | 3) The finalization problem | | Some types require finalization. After the object dies, some other | asynchronous computation has to be scheduled. | | This can be regarded as a generalization of the weak-reference | problem: an object with a finalizer is like an object that has a | "special" weak reference -- one that when the referant dies, an | async computation is scheduled. `---- Am I right that the final udstr_unref() call currently missing is an instance of the "finalizer problem" and should thus be solved by implementing weak references? I might give implementing the proposal outlined in [1] a shot... [1] http://lists.gnu.org/archive/html/pika-dev/2004-05/msg00019.html Cheers, Rotty -- Andreas Rottmann | Rotty@ICQ | 118634484@ICQ | [email protected] http://yi.org/rotty | GnuPG Key: http://yi.org/rotty/gpg.asc Fingerprint | DFB4 4EB4 78A4 5EEE 6219 F228 F92F CFC5 01FD 5B62 To iterate is human; to recurse, divine.