- Joined
- Sep 2, 2005
- Messages
- 1,029
I just found out that GetUnitsOfPlayerAndTypeId and CountUnitsInGroup leak every time they're called. Can someone give a list of all the blizzard functions that leak? is there already one?
No BJs leak any more than nulls to my knowledge.
(CountUnitsInGroup does not leak at all, GetUnitsOfPlayerAndTypeId (and all other Get...) leak one null).
They usually return stuff you have to clean up to avoid leaks, though.
Solution: Avoid using BJs.
I mean functions in the Blizzard.j file, pretty much non-natives.
The majority of them...so all of the blizzard non-natives suck then? Thats alot of stuff.
Damned.
More work for me.
However, they are horribly un-customizable (for example, you have to recode them to get rid of pressing Esc to skip a cinematic sequence)...Also, cinematic BJs are useful, moreover, they have to many function calls inside them so it isn't worth replacing them (a worse thing than an ordinary BJ is a BJ calling another BJ).
function Echo takes string s returns nothing
call Cheat("DebugMsg: " + s)
call DisplayTimedTextToPlayer(GetLocalPlayer(), 0, 0, 60, s)
endfunction
Only for debugging, never in an actual game (And who cares about efficiency when you're debugging)And BJDebugMsg, of course
Only for debugging, never in an actual game (And who cares about efficiency when you're debugging)
Mindy, who cares about the efficiency of your debug messages -.-
Apparently if a handle's reference counter is >0 its index can't be recycled.What do you mean by a null leaking. I heard they do that some times but in what situations and why.