Leaks

Denegoth

New Member
Reaction score
18
I've never really understood leak removal much, so I have a few questions.
1: If I've made an entire map but havent destroyed unit and player groups, do I need to remake all the triggers to clear the leaks?
2: If the leaks don't cause my map to have any lag, even after an hour, is clearing them necessary?

Thanks in advance.
 

Charapanga

New Member
Reaction score
46
1: No, you just need to edit them with custom scripts (call RemoveLocation(udg_my_Var), etc) and add them to the End of triggers that leak, or if you dont store them into variables, the spell will be bugged and wont do what you want it to do

2: If it doesn't lag YOUR computer it might lag somebody elses
 

Diamondeye

New Member
Reaction score
10
I've never really understood leak removal much, so I have a few questions.
1: If I've made an entire map but havent destroyed unit and player groups, do I need to remake all the triggers to clear the leaks?
2: If the leaks don't cause my map to have any lag, even after an hour, is clearing them necessary?

Thanks in advance.

As far as I have understood the problem, leaks uses up some of your PCs "power" because the computer thinks it is necessary to store the info leaked.

So even though it does not cause YOUR computer to lag, it might cause weaker computers (your friends playing with you, perhaps?) to lag.
 

Samael88

Evil always finds a way
Reaction score
181
Does it take time to from exiting the map to showing the loading screen, then your leaks are affecting your map badly.
If you got a fast enought computer it may not be that noticable with a many leaks, I suggest to care about the lowend users aswell.

And btw, picking all players will not leak:thup:
It is not that hard to remove leaks.

set unitgroup = units in region
do stuff
custom script: call DestroyGroup(udg_unitgroup)

also call RemoveLocation(udg_point)

That is the ones that I know of, and units does not need to be destroyed for what I know of, if you use dummy units I suggest using exipiring timers to remove them(easiest way):thup:

Edit:
leaks uses up some of your PCs "power" because the computer thinks it is necessary to store the info leaked.
It is actually called memory-leaks beacuse it affects the ram memory, thought that could be good to know:)

And one more thing: Leaks = BAD
 

Charapanga

New Member
Reaction score
46
@Diamond: It uses up PCs Memory storage and even though it's just an integer or a unit position it will get large if you have periodic triggers, spell triggers etc. they pile up untill you exit the game

And Jinx
 

Samael88

Evil always finds a way
Reaction score
181
@Diamond: It uses up PCs Memory storage and even though it's just an integer or a unit position it will get large if you have periodic triggers, spell triggers etc. they pile up untill you exit the game

And Jinx

integers, reals and strings does not leak:thdown: Not in any noticable matter:p
 

Charapanga

New Member
Reaction score
46
integers, reals and strings does not leak:thdown: Not in any noticable matter:p

if you have a periodic trigger lets say every 0.03 seconds, that's alot of integers stored if you have a 1hour long game...and if you have any more of leaks it might even crash the whole game..
 

Samael88

Evil always finds a way
Reaction score
181
integers, reals, and strings are all stored once by the game and then they are reuced.
If you use the number 408 once the game will store it and the next time you use it retrieve it instead of writing it again:p The same with strings and reals:rolleyes::rolleyes:
 

Romek

Super Moderator
Reaction score
964
Of you have a trigger which picks all players at map init or all units or something, you don't really need to clean it up.
One leak at map init won't hurt.

However, if you have a 0.01 periodic trigger with a few leaks... :thdown:
 

Denegoth

New Member
Reaction score
18
Will this leak?

Code:
Duel
    Events
        Time - DuelTimer expires
    Conditions
    Actions
        For each (Integer A) from 1 to 10, do (Actions)
            Loop - Actions
                Selection - Select Hero[(Integer A)] for (Owner of Hero[(Integer A)])
                Hero - Instantly revive Hero[(Integer A)] at ((Owner of Hero[(Integer A)]) start location), Hide revival graphics
                Visibility - Create an initially Enabled visibility modifier for (Owner of Hero[(Integer A)]) emitting Visibility across Region 007 <gen>
        For each (Integer B) from 1 to 5, do (Actions)
            Loop - Actions
                Camera - Pan camera for (Owner of Hero[(Integer B)]) to (Center of DuelTeam1 <gen>) over 0.00 seconds
                Unit - Move Hero[(Integer B)] instantly to (Random point in DuelTeam1 <gen>), facing 90.00 degrees
        For each (Integer B) from 6 to 10, do (Actions)
            Loop - Actions
                Camera - Pan camera for (Owner of Hero[(Integer B)]) to (Center of DuelTeam2 <gen>) over 0.00 seconds
                Unit - Move Hero[(Integer B)] instantly to (Random point in DuelTeam2 <gen>), facing 270.00 degrees
        Set Duellers[1] = (Number of units in (Units in DuelTeam1 <gen>))
        Set Duellers[2] = (Number of units in (Units in DuelTeam2 <gen>))
 

Romek

Super Moderator
Reaction score
964
(Random Point in Region) returns a location.
Thus, there is a location leak.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top