RefTracker is a heavy userdata object that you can use to track down memory leaks in Lua.
It prints a message when it is created and when it is garbage collected. It also keeps track of the number of instances created. For example, if you place one RefTracker instance in a table that you create in your code, you can find out whether or not the table is ever garbage collected.