lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]

2014-07-10 17:20 GMT+02:00 Carsten Fuchs <>:
> Hi Dirk,
> Am 2014-07-10 11:45, schrieb Dirk Laurie:
>> Any program that relies on __gc for its logical correctness
>> is a jar of nitroglycerine just waiting to be dropped to the floor.
> __gc can be very useful in the C API for managing the lifetime of objects
> that are accessible and used both in C and Lua code.

Oh, I don't mean it isn't useful. I mean that if your program
works with your own __gc but, despite ample memory, fails
with the default, you are in big, big trouble. IMHO __gc
should influence performance and memory usage only,
not whether your program does its job.