Rodead Admin
Number of posts : 89 Age : 33 Localisation : netherlands, Gouda Registration date : 2007-07-02
| Subject: Memory Leaks Wed Sep 19 2007, 21:39 | |
| Memory Leak: the leakage of handle objects, or in other words, basically whenever you create something or reference something, other than integers the game loses it’s location, thus causing a leaked piece of memory. Now granted these are cleaned at the end of the game, but if enough pile up during play without being removed, it can cause serious lag to the players, ranging from a little here and there, to complete un-playability, neither of which is wanted.
Jass: the scripting language used for scripting Maps and AI files in Blizzard Entertainment's Warcraft III game. Most people make triggers in GUI format, the premade template triggers that are in the World Editor. However, the actual language of these is that of JASS, which can give you almost free reign over every aspect of the game.
Custom Script: this is an action in the World Editor Trigger Editor which allows you to type one line of JASS script as opposed to using a template GUI script. This is what we will be using to clean up most of our memory leaks, since Blizzard put in the ability to remove these leaks, but neglected to add them to basic GUI.
Now many different things can cause memory leaks, these include:
Special Effects
Groups
Points
Units
Regions
Forces
Lightning Effects
Floating Text
Countdown Timers
(There may be more which I have forgotten, but these are the ones that need to be dealt with the most, since they are most commonly used.)
Now I will show you examples
Custom script: call DestroyForce( udg_Your_Variable ) //Player Group
Custom script: call RemoveRect(udg_Your_Variable) //Region | |
|