I heard you should "null" the variables when you don't need it anymore, but I saw people sometimes didn't do this when they recommend triggers, so when is necessary do this?
Hello, I was reading about leaks and I didn't quite fully grasp when I should null a Unit variable and other Object variables.
Here are some examples of what I'm currently doing:
Example 1
Events
Unit - A unit Starts the effect of an ability
Conditions
(Ability being...
The following code returns true for r == 0.0 and r == null. Can anyone tell me why? I would expect that only r==0.0 would return true.
local unit t = GetTriggerUnit()
local real r = 0.0
//Save 0.0 value to hashtable
call SaveRealBJ(0.0, GetHandleIdBJ(t), 1, udg_hashTable)
//Other actions...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.