| 05-22-2008, 11:39 PM | #1 |
I don't really know what the problem with boolexpr nulling is. Can anyone explain it to me so I know for future reference? TriggerRegisterAnyUnitEventBJ() uses null for the TriggerRegisterPlayerUnitEvent() function, so isn't that bad? I just want to know the hazards and if it is more efficient to create a dummy True function and use that instead. Or is it a leak? Thanks to any repliers. Btw: I searched but to no avail. |
| 05-23-2008, 12:02 AM | #2 |
It is not "boolexpr nulling," which would be the act of setting a local variable of type boolexpr to null. It is "using a null filter/condition/boolexpr," which leaks a small amount of memory. Example: JASS:call GroupEnumUnitsInRange(g, x, y, r, null) //leaks call GroupEnumUnitsInRange(g, x, y, r, Condition(function ReturnTrue)) //does not leak Using null filters all the time becomes a major drag on performance if you use GroupEnum or similar functions a lot. |
| 05-23-2008, 12:08 AM | #3 |
Yeah, I just wanted to keep the title short so I just chose that. ^^ Anyway, thanks for that. That helps a lot! |
| 05-23-2008, 10:39 AM | #4 | |
Quote:
|
