if I have:
local integer x
local integer array y
local unit z
I figure they leak... so how do you go about destroying them? I am new to jass so all I know is DestroyGroup and RemoveLocation. Or are group and locations all that leak?
you are in bizzaro world if you think local primitives leak.
The only one of concern is the local unit z. If you have no use for him remove the unit, if you still have use for it merely at the end of the function set z=null.