Is removing units from group enough to solve memory leaks?

Status
Not open for further replies.
Level 5
Joined
Jul 12, 2016
Messages
59
What title says, does a system like the one below prevent leaking, or do I need to destroy the group with a custom script? Haven't been able to find a clear answer.

  • Untitled Trigger 004
    • Events
    • Conditions
    • Actions
      • Set VariableSet GroupUnit_Temp1 = (Units of type Footman)
      • Unit Group - Pick every unit in GroupUnit_Temp1 and do (Actions)
        • Loop - Actions
          • Unit Group - Remove (Picked unit) from GroupUnit_Temp1.
To be clear, I know how to prevent group leaking by destroying the group with custom scripts, I'm wondering if the above works as well.
 
Level 11
Joined
Aug 11, 2009
Messages
605
Im pretty sure you have to destroy it. An empty unit group will also leak.
Might be wrong though so better wait for more replies :)
 
Level 2
Joined
Mar 8, 2020
Messages
8
I think calling
Code:
set bj_wantDestroyGroup = true
before creating a group should be enough, is this true?
 
Status
Not open for further replies.
Top