I mean there’s no reason to garbage collect it. The variable needs to be used multiple times but doesn’t need to be changed
I think you’re over looking garbage collecting, variables don’t take up that much memory and the main reason for memory leaks are too many event listeners.
when a thread gets created, by using :Connect() or spawn its env (environment) which includes all global variables and local variables (stored above) stored on the script and then gets garbage deleted once it gets to end
Primitive types don’t get garbage collected except for reference types assuming they have 0 references when the garbage collect runs in the next cycle.
local a = 1
-- scope ends, a wont be garbage collected because it doesnt have to