<--- snip --->
Sorry I wasn't clear about it. Anyway, the short answer is "Yes."
Long answer: Actually, the script code will be collected independent of
using t in main.lua. Keep in mind that loadfile() turns the text script
into a function. There isn't anything special about it being a script vs
a function defined by some other means.
Here's what happens:
1. loadfile( 'get_t.lua' ) compiles the script and places an anonymous
function on the stack.
2. The function is called via the parens () on that same line.
3. That function returns t, and t copied into the "local t" of main.lua.
4. When that line completes, the function is popped off the stack.
At this point the function is no longer referenced. It and it's bytecode
are ready to be garbage collected.
OTOH, if your concern is about the reliability of Lua's GC, I don't
think that is an issue.