- Joined
- Sep 28, 2009
- Messages
- 222
Forget this, its the trigger debug window that leaks, not the game itself. see my second post for more, sry.
just found out that leaks still exist in SC2.
you can download my test map in the attachments.
with this simple trigger:
so, why is this? is the garbage collector not deleting the 2 player grps that get created in every run? hf testing
remember: this trigger executes not even 20 times a second, which is not really often.
my try to fix the issue:
i created a global player grp variable, to destroy the grp after use like in wc3:
so, what now?
lets remove all the stuff and make the trigger even more easy:
why? i dont really know but it does. maybe "all players" also creates a unit grp that isnt destroyed. or chat messages arent deleted and leak automatically. but i can tell you that i had other tests already without chat messages, and the same problem accured, for exmaple with camera actions.
map download: http://www.2shared.com/file/YYfQglUX/leakproof.html
just found out that leaks still exist in SC2.
you can download my test map in the attachments.
with this simple trigger:
-
leak
-
Events
-
Timer - Every 0.05 seconds of Game Time
-
-
Local Variables
-
Conditions
-
Actions
-
Player Group - Pick each player in (All players) and do (Actions)
-
Actions
-
UI - Display ((Text((Number of times (Current trigger) has been executed))) + (Name of player (Picked player))) for (Player group((Picked player))) to Subtitle area
-
-
-
-
so, why is this? is the garbage collector not deleting the 2 player grps that get created in every run? hf testing
remember: this trigger executes not even 20 times a second, which is not really often.
my try to fix the issue:
i created a global player grp variable, to destroy the grp after use like in wc3:
-
leak
-
Events
-
Timer - Every 0.05 seconds of Game Time
-
-
Local Variables
-
Conditions
-
Actions
-
Variable - Set tempgrp[0] = (All players)
-
Player Group - Pick each player in tempgrp[0] and do (Actions)
-
Actions
-
Variable - Set tempgrp[1] = (Player group((Picked player)))
-
UI - Display ((Text((Number of times (Current trigger) has been executed))) + (Name of player (Picked player))) for tempgrp[1] to Subtitle area
-
Variable - Set tempgrp[1] = (Empty player group)
-
Variable - Set tempgrp[1] = No Player Group
-
-
-
Variable - Set tempgrp[0] = (Empty player group)
-
Variable - Set tempgrp[0] = No Player Group
-
-
so, what now?
lets remove all the stuff and make the trigger even more easy:
-
leak
-
Events
-
Timer - Every 0.05 seconds of Game Time
-
-
Local Variables
-
Conditions
-
Actions
-
UI - Display (Text((Number of times (Current trigger) has been executed))) for (All players) to Subtitle area
-
-
why? i dont really know but it does. maybe "all players" also creates a unit grp that isnt destroyed. or chat messages arent deleted and leak automatically. but i can tell you that i had other tests already without chat messages, and the same problem accured, for exmaple with camera actions.
map download: http://www.2shared.com/file/YYfQglUX/leakproof.html
Last edited: