06-13-2014, 04:41 AM
The problem with lua's garbage collection is that its a non-deterministic collector (like java). It only collects when lua is running low on memory. If you want to see why we cant use it for locks I suggest you read http://blogs.msdn.com/b/oldnewthing/arch...47586.aspx on the CLR gc which works in the same way. Long story sort is we can't guarantee locks are released.
We have a element based system as well. The problem is that someone has to clean up the player object when the client is gone and the plugin has no guarantees that its run on the same thread as the one that does the clean up. It could be any of the network threads or a generating thread or another worlds thread. So no matter where we move the clean up there's still a risk a plugin could be working with it at the same time.
We have a element based system as well. The problem is that someone has to clean up the player object when the client is gone and the plugin has no guarantees that its run on the same thread as the one that does the clean up. It could be any of the network threads or a generating thread or another worlds thread. So no matter where we move the clean up there's still a risk a plugin could be working with it at the same time.