How do I release a local variable?

I got this 'locals error – turned out I declared too many local varaibles. 

How do I “release” a local variable?

locals/globals/branch errors are usually a helpful indicator for you to refactor your function. These limits are due to the bytecode - you can’t release a local as such, just split your function or use a different container (dict/table) for your vars or reuse var names.