omfg! Blizzard natives leak!!! (please say im wrong)
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?
I use one tragedic method wich you won't like so much.I use loops.Here is one pretty way to make it.
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