MeleeClearNearbyUnits

Parameters
x real
y real
range real
bug

Leaks handle nearbyUnits: In Jass you must set local variables that hold agents (or any child type) to null at the end of functions to avoid reference counter leaks.

comment
return type
nothing
Source code
function MeleeClearNearbyUnits takes real x, real y, real range returns nothing
    local group nearbyUnits
    
    set nearbyUnits = CreateGroup()
    call GroupEnumUnitsInRange(nearbyUnits, x, y, range, null)
    call ForGroup(nearbyUnits, function MeleeClearExcessUnit)
    call DestroyGroup(nearbyUnits)
endfunction
Source
Blizzard.j
wc3modding.com
MeleeClearNearbyUnits