| 12-03-2007, 10:45 AM | #1 |
If I put a null on a boolexpr parameter, will it leak? I saw a thread on the hive saying that it will, I just want to confirm if its true. JASS:native GroupEnumUnitsOfPlayer takes group whichGroup, player whichPlayer, boolexpr filter returns nothing JASS:call GroupEnumUnitsOfPlayer( g, p, null) ![]() |
| 12-03-2007, 11:37 AM | #2 |
yes, it leaks, so a good practice to avoid this issue is to have in your map a public function to replace the null option. JASS:library True initializer Init globals boolexpr TrueCnd endglobals private function True takes nothing returns boolean return true endfunction private function Init takes nothing returns nothing set TrueCnd = Condition(function True) endfunction endlibrary function test takes group g, player p returns nothing call GroupEnumUnitsOfPlayer( g, p, TrueCnd) endfunction |
| 12-03-2007, 12:10 PM | #3 |
How the fuck can a null leak? (I am not saying it can't I am just amazed at jet another blizz goof) |
| 12-03-2007, 08:50 PM | #4 | |
Quote:
It's more like it causes the game to allocate more and more memory each time which is a bad thing for maps that tend to spam Enum functions. |
