• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • 🏆 Hive's 6th HD Modeling Contest: Mechanical is now open! Design and model a mechanical creature, mechanized animal, a futuristic robotic being, or anything else your imagination can tinker with! 📅 Submissions close on June 30, 2024. Don't miss this opportunity to let your creativity shine! Enter now and show us your mechanical masterpiece! 🔗 Click here to enter!

[JASS] Do I need to null "location" or "group" if I have not initialized them?

Status
Not open for further replies.
Level 11
Joined
Oct 11, 2012
Messages
711
JASS:
function example takes nothing returns nothing
    local location loc  // I know using "location" should be avoided, but for the purpose of this thread please allow me to use it here. 
    local group g
    local timer t
    if udg_boolean = true then
         set g = CreateGroup()
         set loc = ......
         set t = CreateTimer()
         ...........
    endif
    //Do I need to do the following if "udg_boolean" is false?
    call RemoveLocation(loc)
    call DestroyGroup(g)
    set loc = null
    set g = null
    set t = null
endfunction

My question is in the code above, thnx all.
 
Status
Not open for further replies.
Top