JASS:
local unit u = CreateUnit(Player(0),'hfoo',0,0,0)
call SaveUnitHandle(udg_hashtable,1,1,u)
set u = null
In this code, we created a local variable to store the unit into the hashtable.
And after that we had to null the local variable.
What about this script below. Now we did not created any local variables.
But will this leak in some way?
JASS:
call SaveUnitHandle(udg_hashtable,1,1,CreateUnit(Player(0),'hfoo',0,0,0))