Memory Leak help

Doctor-Peppe

New Member
Reaction score
0
Hi, i am not known to jass so i was wondering if anyone could help me to write a custom code that will remove Unit group ARRAY memory leak.
The trigger looks like this
For each (Integer A) from 1 to 12, do (Actions)
Loop - Actions
Unit Group - Pick every unit in UnitGroupStunningQuake[(Integer A)]


So now i need custom code that will destroy UnitGroupStunningQuake (integerA)
 

Chocobo

White-Flower
Reaction score
409
if it doesnt have a loop action?

What if?

Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[1])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[2])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[3])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[4])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[5])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[6])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[7])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[8])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[9])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[10])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[11])
Custom Script : call DestroyGroup(udg_UnitGroupStunningQuake[12])
 

martix

There is no spoon
Reaction score
49
There was a line that destroys any group automaticaly after it finishes doing whatever with it. So there would be no need for all the above lines. Or specific names too.
 

Sooda

Diversity enchants
Reaction score
318
and how about udg_UnitGroupStunningQuake - OWNER OF TRIGGERING UNIT - ???
What next ?

One way (Credits to xPheRe):
Code:
Set pgTmp = Convert Player 1 To Player Group
...
Custom script: call DestroyForce(udg_pgTmp)
or my own wild guess:
Code:
Custom script: call DestroyGroup (udg_UnitGroupStunningQuake[bj_GetOwningPlayer(GetTriggerUnit()))]
:rolleyes:
 

Chocobo

White-Flower
Reaction score
409
Code:
Custom script: call DestroyGroup (udg_UnitGroupStunningQuake[bj_GetOwningPlayer(GetTriggerUnit()))]

Can't work :p


There's the real one :

Code:
Custom script:     call DestroyGroup(udg_UnitGroupStunningQuake[GetPlayerId(GetOwningPlayer(GetTriggerUnit()))+1])

+1 because Player 1 = Player(0), Player 2 = Player(1)... Player 12 = Player(11)

Took me 2 min to find the problem in.
 
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