- Joined
- Nov 29, 2006
- Messages
- 2,482
Hm well im going to make an example, and then pose the question
Is it pointless to nullify the variable inside the loop, since its getting another value after next lap?
Or should I set it to null thus it could leak?
Hm an explanantion would be nice =)
/Regards
Ps: I've seen that when blizzards creation of "preplaced units" doesn't nullify their variables iin between... But still...
JASS:
globals
multiboard udg = CreateMultiboard()
endglobals
function example takes nothing returns nothing
local multiboarditem mbi = null
local integer i = 0
call MultiboardSetRowCount(udg_mb, 7)
call MultiboardSetColumnCount(udg_mb, 1)
loop
exitwhen i == 7
set mbi = MultiboardGetItem(udg_mb, i, 0)
call MultiboardSetItemStyle(mbi, false, false)
call MultiboardReleaseItem(mbi)
//Should I nullify mbi here?
//set mbi = null
set i = i+1
endloop
set mbi = null
endfunction
Is it pointless to nullify the variable inside the loop, since its getting another value after next lap?
Or should I set it to null thus it could leak?
Hm an explanantion would be nice =)
/Regards
Ps: I've seen that when blizzards creation of "preplaced units" doesn't nullify their variables iin between... But still...