|
|
||
|
I made a memory pool out of userdata once by setting up a few generic for the udata classes that overwrites their __gc method to shove the thing back into a freelist. The allocators would also take from this freelist. It can be done quite easily with a little Lua script and you don't have to change any of your code to support it aside from running the functions over the class when loaded.
// Niklas