HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Killing Triggers

07-23-2006, 06:30 PM#1
SilverSong
I read somewhere that once you have a trigger, if you kill the trigger that'll cause less memory leak within a map.

I was copying some triggers off of a map, and I don't think it has any kill triggers.

How do I write a kill trigger?
07-23-2006, 06:53 PM#2
iNfraNe
Collapse JASS:
call DestroyTrigger(GetTriggeringTrigger())
07-23-2006, 06:59 PM#3
The)TideHunter(
Quote:
Originally Posted by iNfraNe
Collapse JASS:
call DestroyTrigger(GetTriggeringTrigger())

That leaks an trigger event.
07-23-2006, 07:00 PM#4
Captain Griffen
And? Not significant in non-dynamically created triggers.
07-23-2006, 07:17 PM#5
SilverSong
I've done nothing at all with Jass... umm how?
07-23-2006, 07:25 PM#6
Ice_Keese
Check this...
http://www.wc3campaigns.net/showthread.php?t=80072
07-23-2006, 07:30 PM#7
HernanG
Trigger:
Custom script: call DestroyTrigger( GetTriggeringTrigger() )
That should work
07-23-2006, 08:20 PM#8
James1654
There is two tutorials about this. Maybe you should check the tutorials section before you use the forums, to prevent other topics of people that actually need the help getting buried (No, I do not mean myself, because none of mine have yet been buried, but other people in desperate need of help may be ignored due to un-responsible thread starting).
07-23-2006, 09:20 PM#9
Vexorian
DestroyTrigger does not leak an event.

It would leak triggeraction if you don't remove the triggeraction from the trigger manually.

It would leak triggercondition and boolexpr but no one uses them for dynamic triggers anyways
07-24-2006, 05:20 AM#10
Sharingan
!!!
Oh dear, good to know...
But why wouldn't it also leak an event?
Aren't events handles too?
07-24-2006, 10:36 AM#11
iNfraNe
Quote:
Originally Posted by The)TideHunter(
That leaks an trigger event.
No it doesnt. It leaks action and condition (if it has)

but since you cannot get those if you dont store them in a variable its impossible to remove them in gui.

Events are handles too, but since there is no "DestroyEvent"...