I ever did it this way but calling set u = null for every unit in group can slow things down and even Nestharus didnt do that in his vJass tut. video so my question is:
There is no set u = null in the loop so I wonder if this leak because it was said that everytime you give some handle pointer a value(set u = FirstOfGroup() for instance) it must be nulled to make the pointer free(number of sets and number of nulls must be equal)
JASS:
local group g = CreateGroup()
local unit u
call GroupEnumUnitsInRange(g, blabla whatever) // this is not important
loop
set u = FirstOfGroup()
exitwhen u == null
call GroupRemoveUnit()
//some actions
endloop
set u = null