Oh, don't worry, local variables are destroyed when the function
hits a return statement or an "endfunction" statement. The only
leak is caused by handles because they are referenced with a
counter - each variable currently set to the handle adds +1 to
the handle's pointer list, and once the counter hits 0 the index
will be recycled.
Sounds confusing I know, it is.