Memory leaks are caused from temporary unit groups, points, play groups, basically any variable slot that you reference with computed units rather than an actual variable.
Memory leaks are caused by pieces of data that are not recycled by warcraft automatically. Eventually it can cause lags, and possibly crashes. The primary teller if a map has a lot of memory leaks is that when you exit the map, it takes a significant amount of time to close.
Edit: You recycle your memory by calling a custom script to "destroy" the variable. like this
Memory is the processing power your computer uses to run tasks. The more memory a task takes to run, the slower your system becomes ("lag").
A memory leak is when you waste memory by creating active data that serves no purpose. Specifically, the game automatically generates variables when the trigger doesn't specify a variable and requires a variable. For example, when you check for "all units owned by player" you ask the game to create a unit group with a player comparison condition. However, you don't specify the variable, so the variable is automatically created never to be used again but in effect until the game ends.
This causes your trigger to slow down the game's process every time the trigger runs. With enough memory leaks, your map becomes unplayable. To prevent this, you have to tell the game to destroy the variable when it no longer serves a purpose by destroying it. Read a tutorial here.
Optimization is essential in triggering especially when using a template form of coding, such as the World Editor's Graphic User Interface. You need to understand what the template does in order to create functional triggers.
I'm on a page about incorrect corrections, and spent the better part of like two hours trying to get someone to understand that -5^2 = -25, not 25, and then that post had comments get reposted because that group is self sustaining, and that person was in turn trying to explain what I just explained to them. And I'm taking that as a victory
I will be AFK for a couple of days you guys hold down the fort while I am gone. I will be checking in on my phone but that will severly limit me. Be back saturday!
I just got to watch the video because even though I was there I was trying to work out tech problems with the chat since I was the social media guy so I was distracted but check it out guys the video is super fucking great!