• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] omfg! Blizzard natives leak!!! (please say im wrong)

Status
Not open for further replies.
Level 3
Joined
Aug 4, 2004
Messages
22
well, as it turns out, after some extensive testing, i have come to the conclusion that blizzards native group api functions, namely, GroupEnumUnitsInRect, and GroupEnumUnitsInRange LEAK!.

i expect the problem, like with PolarProjectionBJ, is that the location and rect arguments are never removed in the function.

hopefully im wrong, but i doubt it.

man, is there another way to to Group Units In Range?

ive lost all faith in scripting now. :(
 
Level 6
Joined
Sep 9, 2004
Messages
152
I use one tragedic method wich you won't like so much.I use loops.Here is one pretty way to make it.
JASS:
 local group g1   
 //Choose whatever name you want
 local group g2=CreateGroup()     
 //I use another group cause in my way you'll lose all the units in g1
 local unit u
     set g1=GetUnitsInRangeOfLocAll({radius},{location{)
     loop
         exitwhen IsUnitGroupEmptyBJ(g1)==true
         //Here the loop will exitwhen you clean up the group g1
         set u=FirstOfGroup(g1)
         //actions you wish to add like "call KillUnit(GetEnumUnit())"but this time is 'u'not 'enumunit'
         //..........
         call GroupAddUnitSimple(u,g2)     
         //Here below we remove 'u' from 'g1' so we add it again in 'g2' cause you'll maybe need those units again.
         call GroupRemoveUnitSimple(u,g1)    
         //this is needed cause we need to show the first unit and as they are disapearing from 'g1' the first unit will be other
     endloop
 set u=null
 set g1=null
 set g2=null
This way you'll break down the functions added to the GetUnisInRange.Well i hope you understand it.GL
 
Level 3
Joined
Aug 4, 2004
Messages
22
lol. :)

GetUnitsInRangeOfLocAll calls GetUnitsInRangeOfLocMatching,

GetUnitsInRangeOfLocMatching calls, GroupEnumUnitsInRangeOfLoc, which leaks.
 
Status
Not open for further replies.
Top