[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pika-dev] Garbage collection/finalizers
From: |
Andreas Rottmann |
Subject: |
[Pika-dev] Garbage collection/finalizers |
Date: |
Sun, 17 Oct 2004 15:41:36 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
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 | address@hidden | address@hidden | address@hidden
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.
- [Pika-dev] Garbage collection/finalizers,
Andreas Rottmann <=