Okay, so I've seen a lot of people obsessed with removing leaks, so I guess I should clear mine too, but I have few questions about what leaks and what doesn't (and what leaks more than other things). So..
1) Is there any point in doing this:
Set Temp_Point = Position of Triggering unit
Set Temp_Point = Temp_Point with offset 200 towards 180 deg
... do something at Temp_Point ...
or is
Set Temp Point = Position of Triggering unit with offset 200 towards 180 deg
... do something at Temp_Point ...
enough?
2) Does "Triggering Unit" leak or should I do: Set Temp_Unit = Triggering Unit?
3) Do calculations leak? Example:
damage target for (50*(Level of .... for triggering unit))
or shall it be done like:
Set Temp_Integer = (Level of ... for triggering unit)
damage target for (50*Temp_Integer)
or perhaps this is the best way?
Set Temp_Integer = (50*(Level of .... for triggering unit))
damage target for Temp_Integer
4) If I have several "Temp" Variables, that I use in many triggers (often), do I really need to destroy them every time or I can just let them be as they are and just change their values? They shouldn't leak much, right?
5)Is it possible that clearing leaks causes leaks??
When I was still begining to learn how to use triggers, I had a trigger that was working well. Later on I read how to remove leaks and when I started destroying the variables in the end of the trigger - I got lag in the game.
1) Is there any point in doing this:
Set Temp_Point = Position of Triggering unit
Set Temp_Point = Temp_Point with offset 200 towards 180 deg
... do something at Temp_Point ...
or is
Set Temp Point = Position of Triggering unit with offset 200 towards 180 deg
... do something at Temp_Point ...
enough?
2) Does "Triggering Unit" leak or should I do: Set Temp_Unit = Triggering Unit?
3) Do calculations leak? Example:
damage target for (50*(Level of .... for triggering unit))
or shall it be done like:
Set Temp_Integer = (Level of ... for triggering unit)
damage target for (50*Temp_Integer)
or perhaps this is the best way?
Set Temp_Integer = (50*(Level of .... for triggering unit))
damage target for Temp_Integer
4) If I have several "Temp" Variables, that I use in many triggers (often), do I really need to destroy them every time or I can just let them be as they are and just change their values? They shouldn't leak much, right?
5)Is it possible that clearing leaks causes leaks??
When I was still begining to learn how to use triggers, I had a trigger that was working well. Later on I read how to remove leaks and when I started destroying the variables in the end of the trigger - I got lag in the game.