Leak or Not Leak thats the question

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
Does this leak?
Code:
                Set tempgroup = (Units of type Grunt)
                Unit Group - Pick every unit in tempgroup and do (Actions)
                    Loop - Actions
                        Unit - Remove HelmOrcs from (Picked unit)
... Some actions that change HelmOrcs
                Unit Group - Pick every unit in tempgroup and do (Actions)
                    Loop - Actions
                        Unit - Add HelmOrcs to (Picked unit)
                Custom script:   call DestroyGroup (udg_tempgroup)
 

AceHart

Your Friendly Neighborhood Admin
Reaction score
1,495
> Set tempgroup = (Units of type Grunt)

This creates a new group that needs taken care of.
Adding or removing units does not create anything, no problem there.
 

Drunken_God

Hopes to get back into Mapmaking with SC2 :)
Reaction score
106
but does it leak if i create the unit group and then use it twice?
should i create it two times and remove it two times?
 

ZiggyMcjoney

Data editor?! AAAHHHHH!
Reaction score
95
It will only leak if you change it before destroying it. So no, you needn't create/destroy it twice.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top