- Joined
- Jan 27, 2016
- Messages
- 89
Del
Last edited:
What should I change the animation to? Tried a few things but still nothing display.
This leaks a handle index due to the local declared local handle variable reference counter leak on return bug.Set Temp_Group = (Units within 512.00 of Temp_Point matching (((((((Matching unit) is alive) Equal to True) and ((Triggering unit) Not equal to (Matching unit))) and ((Level of SDummy Inverser Magicizer for (Matching unit)) Not equal to 1)) and (((Matching unit) is A structu
function GetUnitsInRangeOfLocMatching takes real radius,location whichLocation,boolexpr filter returns group
local group g = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(g, whichLocation, radius, filter)
call DestroyBoolExpr(filter)
return g
endfunction
As I said, it leaks because of the "local declared local handle variable reference counter leak on return bug".Dr Super Good can you elaborate a bit? I don't know which specific part of that leaks and I don't really know how to use DestroyBoolExpr without converting all my triggers to Jass or custom scripts.
function GetUnitsInRangeOfLocMatching takes real radius,location whichLocation,boolexpr filter returns group
// bj_randomSubGroupGroup is a global group variable and should be safe to use since its intended function leaks due to LDLHVRCL anyway
set bj_randomSubGroupGroup = CreateGroup()
call GroupEnumUnitsInRangeOfLoc(bj_randomSubGroupGroup, whichLocation, radius, filter)
call DestroyBoolExpr(filter)
return bj_randomSubGroupGroup
endfunction
Yes, nulling the local declared local handle variable before function return will fix the leak. However since it is used as the argument for the function return this is not possible and hence you will need to use a global variable to hold it or declare an extra parameter.Would nulling the groups make it work without leaks?
Not that I am aware of. WC3 GUI is really bad unfortunately. Maybe if you import a custom blizzard.j file with those natives fixed in it then it might work to fix the leaks.Is there an easier way to deal with it in GUI?