lua-users home
lua-l archive

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


On Fri, Jun 12, 2009 at 12:30 PM, Niklas Frykholm<niklas@frykholm.se> wrote:
> destroy. But lua userdata must live on the heap, so in Lua we are
> forced into the slow behavior.

So some kind of guaranteed finalization would do the job, if one could
indicate that a particular object had to be collected when out of
scope. In fact, just having the ability to force __gc for such objects
would allow for a custom scheme, not so?

Whether this would impact on general performance, I don't know: such
objects would have to be specially marked for 'impatient disposal'.
RAII is the obvious goal for such a feature.

steve d.