- Joined
- Feb 4, 2009
- Messages
- 1,314
Can't find the leak (probably something new)
edit: the trigger really should run 2 million times else I can't measure the leak cause it is small
please help me find the leak
Note:
made this trigger leak like 10 MB per second
edit2: similar ammount of leak:
(of cause this destroys the group so I can't use it any longer but it was just to test that it leaks)
JASS:
function EnumStandardFilter takes nothing returns boolean
set udg_ue = GetFilterUnit()
return not(IsUnitType(udg_ue,UNIT_TYPE_MECHANICAL)or IsUnitType(udg_ue,UNIT_TYPE_STRUCTURE)or IsUnitType(udg_ue,UNIT_TYPE_DEAD)or IsUnitType(udg_ue,UNIT_TYPE_FLYING)or IsUnitType(udg_ue,UNIT_TYPE_MAGIC_IMMUNE)) and IsUnitEnemy(udg_ue,udg_p)
endfunction
function GroupEnumStandard takes group g, unit u, real x, real y, real r returns nothing
local boolexpr be = Condition(function EnumStandardFilter)
set udg_p = GetOwningPlayer(u)
call GroupEnumUnitsInRange(g, x, y, r, be)
set be = null
endfunction
-
Execute
-
Events
-
Player - Player 1 (Red) skips a cinematic sequence
-
-
Conditions
-
Actions
-
Set i2 = 0
-
Custom script: loop
-
Custom script: exitwhen udg_i2 > 2000
-
Custom script: call GroupEnumStandard(udg_g, udg_u, 0, 0, 500)
-
Set i2 = (i2 + 1)
-
Custom script: endloop
-
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
-
If - Conditions
-
i Less than 1000
-
-
Then - Actions
-
Set i = (i + 1)
-
Trigger - Run (This trigger) (ignoring conditions)
-
-
Else - Actions
-
Game - Display to (All players) the text: rdy
-
-
-
-
edit: the trigger really should run 2 million times else I can't measure the leak cause it is small
please help me find the leak
Note:
JASS:
call DestroyBoolExpr(be)
edit2: similar ammount of leak:
JASS:
set g = CreateGroup()
call GroupEnumUnitsInRange(g, x, y, r, be)
call DestroyGroup(g)
set g = null
Last edited: