Thanks for the kind words, mort 
To answer your question regarding non-table (or function) variables, really the only thing you need to worry about is global variables, as local variables will be collected once the block of code they are in is finished executing.
Global variables, however, are never collected until you set them to nil. This is the primary reason why I usually advise against globals. Performance improvements aside, it has nothing to do with globals themselves, and everything to do with the fact that it’s very easy to lose track of global variables if you’re not careful with using them.
Below is an example scene module that uses local variables. Afterwards, I’ll explain which variables would get collected on their own, and which one’s you’d likely want to nil out yourself when you’re finished with them.
examplescene.lua
local storyboard = require "storyboard"local scene = storyboard.newScene()local var1 = "string variable"local var2 = 100function scene:createScene( event ) local group = event.view local var3 = "another string variable" local var4 = 7777 print( var1, var2, var3, var4 )endscene:addEventListener( "createScene", scene )return scene[/code]In the example above, when a "createScene" event is dispatched and the listener function is called, var3 and var4 do not have to manually be nil'd out. They are local variables that are self-contained within the function's block of code. When that function is finished executing, var3 and var4 are collected safely.var1 and var2 are also local variables. However, the "block" they live in is the entire scope of the module (with the exception of the few lines above their definition). var1 and var2 are also known as "local globals". As long as the module is loaded into memory (e.g. until the scene is removed), these variables (along with their contents) also remain until (1) the module is removed and "unrequired" or (2) they are nil'd out manually.Therefore, if it's safe to get rid of the data that var1 and var2 holds, then you might consider nil'ing out those variables during an "exitScene" or "destroyScene" event. However, doing that is pointless if you plan on calling storyboard.removeScene() on the scene because in that case, the entire module (which include its local variables) will be garbage collected.The above also applies to local variables that are references to tables and functions. For instance, if you have a small block of code, a function lets say, which has a local variable that references an external table or function (an upvalue or global), you wouldn't need to nil out that local variable reference as it will be collected once the block of code that it "lives" in is finished executing. [import]uid: 52430 topic_id: 23996 reply_id: 96799[/import]