Leaking

spirits

New Member
Reaction score
0
Hello, before you read please don't yell at me over the internets....

Anyways I'm pretty knew to wc3 map making, and was wondering what exactly is leaking and could some one give me an example?
 

Varine

And as the moon rises, we shall prepare for war
Reaction score
808
It's when a trigger doesn't work right. Like if you have a trigger to spawn units ever 2 seconds and it skips every other time.
 

jig7c

Stop reading me...-statement
Reaction score
123
a leak is an error or leading up to an error in your coding, whether you use JASS or regular triggers... for example in this trigger, lets say you want to revive all of player 1's units if they die, at the location of their death...

event
a unit dies
condition
dying unit is owned by player 1 equal to true
action
set DyingUnit = Dying unit
set Location = position of DyingUnit
create 1 DyingUnit at Location for Player 1 facing x degrees
call RemoveLocation (udg_Location) <---- this is to clean up the "leak"

Leak is a pretty general term in World Editor... it means a lot of things, but you want to avoid those as much as possible in your coding...
 

Azlier

Old World Ghost
Reaction score
461
No, a leak is when you lose all reference to a bit of data, such as a timer or dialog or something. Any non-static handle, really. When you have no reference to it, it floats around in game memory for no reason, slowing things down, being indestructible.


Units (aside from dummies that have no purpose staying around forever...) don't leak, for they die naturally. Trees do leak, actually. Even after death they hang around.
 

Azlier

Old World Ghost
Reaction score
461
It can hurt performance, yes. It holds memory for what might be better used, and handle allocation is not O(1), so that can hurt things a bit.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      • Ghan
        Administrator - Servers are fun

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top