Using DestroyTrigger, benefits vs. risks

O.A

Quantum physics rules
Reaction score
29
Say your map has over 1000 triggers, out of which at least 70% run only once (quest related), would it be beneficial in this case to destroy them after they've run. I've read it can have a great impact, but i've also read it can cause crashes and other problems. However, if you're sure you only run the trigger once, are there any risks? For example references to existing/non-existing variables in those triggers, or anything of the sort?
 

PurgeandFire

zxcvmkgdfg
Reaction score
509
This is an interesting thread on it:
http://www.wc3c.net/showthread.php?t=101891

The benefit--you save memory (not much, but it can be considered good practice, akin to destroying objects when they're finished being used). It may be worth it in the end if you have enough triggers. To avoid the risk of handle stack corruption, just don't destroy any triggers with waits. I haven't encountered any problems with destroying triggers immediately after I was finished using them.
 
  • Like
Reactions: O.A

Accname

2D-Graphics enthusiast
Reaction score
1,462
Not that I would know of. Triggers dont take much memory, and if they are not running they dont cost any performance either.
So destroying them should not yield any benefits whatsoever.
 
  • Like
Reactions: O.A
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top