this is a function in BJ.
function DistanceBetweenPoints takes location locA, location locB returns real
local real dx = GetLocationX(locB) - GetLocationX(locA)
local real dy = GetLocationY(locB) - GetLocationY(locA)
return SquareRoot(dx * dx + dy * dy)
this is a Custom function.
function func1 takes nothing returns nothing
local location A = GetUnitLoc(unit_a)
local location B = GetUnitLoc(unit_b)
local real dist = DistanceBetweenPoints(A,B)
set A = null
set B = null
Does the use of this function DistanceBetweenPoints cause memery leak? Local location A and B was removed at func1. But location locA and locB wasn't removed at DistanceBetweenPoints.