Memory Leak - Get variable's array

FarAwaY

TH.net Regular
Reaction score
9
Hello I have a question on how to remove a memory leak.

For eg I have 2 variables called ABCGroup and ABCInteger.
ABCGroup has an array so I set it to ABCGroup[ABCInteger]

Now my question is how do I remove the memory leak?
Custom Script : Call DestroyGroup(udg_ABCGroup[ABCInteger])?
 

Icyculyr

I'm a Mac
Reaction score
68
Actually I think you need to add a udg_ prefix to the ABCInteger...
Optionally you could also use GroupClear() not quite sure what the difference between them is.

Kind Regards
 

Romek

Super Moderator
Reaction score
964
> Optionally you could also use GroupClear() not quite sure what the difference between them is.
One clears the group, the other destroys it.
Yes, [ljass]call DestroyGroup(udg_ABCGroup[udg_ABCInteger])[/ljass] is correct.
 

Icyculyr

I'm a Mac
Reaction score
68
What's the difference on the memory though?
Destroying it destroys the group, clearing it clears it, but what's the difference on the memory?

Kind Regards
 

Darthfett

Aerospace/Cybersecurity Software Engineer
Reaction score
615
What's the difference on the memory though?
Destroying it destroys the group, clearing it clears it, but what's the difference on the memory?

Kind Regards

ClearGroup removes all the units from the group. DestroyGroup removes the group from memory. With ClearGroup, the group still exists, and still takes memory. The group is still allocated, so I don't think the amount of units in the group makes a difference.

ClearGroup is usually just used for re-using a group in quick succession, or inside a group recycling system (JASS), DestroyGroup is just part of removing leaks.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top