| 02-14-2006, 12:26 PM | #1 |
Are any memory leaks creating when passing arguments? For example, given the following code JASS:function FuncB takes location temp_loc returns nothing endfunction function FuncA takes nothing returns nothing local location my_location = GetRectCenter(GetPlayableMapArea()) call FuncB ( my_location ) // Cleanup call RemoveLocation ( my_location ) set my_location = null endfunction What happens to the temp_loc argument in FuncB? Is it passed by reference and properly cleaned up at the end of FuncA or is it passed by value and creating a new point that doesn't get cleaned up? [size]edit: for wc3c's vanity's sake use [jass] instead of [code] next time[/size] |
| 02-14-2006, 12:28 PM | #2 |
all variables of types derived from handle are pointers. |
