lua-users home
lua-l archive

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

Alex Bilyk wrote:

>Michael Naunton wrote:
>I'd like enlightenment too. I currently just punted and wrote a C++
>wrapper template to push userdata as a T*, classTag pair. That way I can
>at least allocate my real data in mempools, etc, and vector GC stuff to
>the real class. Ugly as hell, but at least the ugliness is contained.
>I don't quite understand how you can save on full user data allocations
>using <class*, tag> pairs. You would still need to have a full user data
>per pair, wouldn't you? You could wire it to a single "__gc" handler,
>but allocations... Hmm.
Sorry to not make myself clear - I accept the full user data
allocations. I just stick it in a wrapper hoping that either a) the
overhead will not prove to be too high, or b) someone will enlighten me
and then I rewrite my wrapper class.