Please tell me if any of these leak. I will explain the special circumstances in which these apply to. I know what leaks are, and I certainly know how to fix them; however, these questions are not answered in most leak tutorials, and the common sense I was given doesn't know life well enough to come to a conclusion.
Creates a special effect attached to unit's chest. Does the game retain the position (X,Y,Z) of the unit's chest?
Must I store the region to a variable, then destroy the region variable? The tutorials mentioned it, yet in their example for a leakless trigger did not set it to a variable.
Do I have to store the triggering unit as a unit variable? Same as when referencing a unit such as Target Unit of Issued Order
Should I make a player group, add all players, then use that as a reference rather than GUI's (All Players)?
One final question: Can leaks be in conditions?
Trigger:
- Special Effect - Create a special effect attached to the chest of (Target unit of issued order) using Abilities\Spells\Human\HolyBolt\HolyBoltSpecialArt.mdl
- Special Effect - Destroy (Last created special effect)
Creates a special effect attached to unit's chest. Does the game retain the position (X,Y,Z) of the unit's chest?
Trigger:
- (Hero Transport 2 <gen> contains Hero[(Player number of (Triggering player))]) Equal to True
Must I store the region to a variable, then destroy the region variable? The tutorials mentioned it, yet in their example for a leakless trigger did not set it to a variable.
Trigger:
- ((Triggering unit) is A Hero) Equal to True
Do I have to store the triggering unit as a unit variable? Same as when referencing a unit such as Target Unit of Issued Order
Trigger:
- Player Group - Pick every player in (All players) and do (Actions)
- Loop - Actions
- Player - Make (Unit-type of (Sold unit)) Unavailable for training/construction by (Picked player)
- Loop - Actions
Should I make a player group, add all players, then use that as a reference rather than GUI's (All Players)?
One final question: Can leaks be in conditions?