• 🏆 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!
  • ✅ Time to vote for the top 3 models! The POLL for Hive's 6th HD Modeling Contest: Mechanical is now open! 📅 Poll close on July 16, 2024! 🔗 Cast your vote now!

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
597
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