[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: RE: User data garbage collection ...
- From: Paul Hsieh <qed@...>
- Date: Tue, 02 Oct 2001 09:35:18 -0700
Thanks for everyone's help. I was trying to figure this all out by just looking through the
lau.h file and I was looking for some kind of c function pointer declaration being passed
around (D'oh!).
Well ok since "gettagmethod(tag(obj), "gc")" appears to be deprecated, how am I supposed to stimulate explicit
garbage collection? I.e., basically I need a kind of "free". Obviously there is a kind of chicken and egg thing with trying
to pass a object to be "freed" in a garbage collecting language like Lua, so the next best thing is to just lose the reference
then explicitly garbage collect a particular tag (I don't really want to garbage collect the whole system). However
looking through lgc.c there does not seem to be a way to do that.
Without something like this my choices are 1) explicitely garbage collect the whole system or 2) write my own explicit
free which frees all the extraneous stuff in the userdata except for the containing base memory which would be cleaned
up at garbage collection time. Is this correct?
--
Paul Hsieh
qed@pobox.com