- Joined
- Jul 20, 2004
- Messages
- 2,760
Ok, I'm already confused. Some people tell me that PolarProjectionBJ leaks, other say that it doesn't. Just curious, if it leaks why and where.
~Daelin
~Daelin
call SetUnitPositionLoc ( u , PolarProjectionBJ ( GetUnitLoc ( u ) , 600 , 0 ) )
local location l = GetUnitLoc ( u )
local location p = PolarProjectionBJ ( l , 600 , 0 )
call SetUnitPositionLoc ( u , p )
call RemoveLocation ( l )
call RemoveLocation ( p )
set l = null
set p = null
local real x = GetUnitX ( u ) + dist * Cos(angle * bj_DEGTORAD)
local real y = GetUnitY ( u ) + dist * Sin(angle * bj_DEGTORAD)
call SetUnitPosition ( u , x , y )
Why should it? Only objects leak. The functions here uses numeric vaules so no leak here.Jacek said:What if I make 2 functions PolarProjectionX and PolarProjectionY returning X and Y using Sin/Cos? Will that leak too?