• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

[JASS] Memory leakage

Status
Not open for further replies.
Level 9
Joined
Oct 11, 2009
Messages
477
Hello. Could I ask something? Do JASS-type triggers still leaks memory even if without the line:call(udg_my_variable) ? Thanks in advance!!!:grin:
 
Level 18
Joined
Oct 18, 2007
Messages
930
Leaks are the word used for Memory Leaks. Meaning that memory is unaccecable but stored. Thus meaning loss of speed etc.

When you don't remove a handle inside a variable or store a handle in a variable for later use, that handle will let go and will be in a such state where it cannot be retrived. If this happens alot it will lead to lagg. So Leak = Handles leaking out in to never be taken back.

All handles are auto destroyed uppon map quit.


So YES. JASS still leaks. Everything you do leaks, just remember to store->Destroy.
 
Level 9
Joined
Oct 11, 2009
Messages
477
Leaks are the word used for Memory Leaks. Meaning that memory is unaccecable but stored. Thus meaning loss of speed etc.

When you don't remove a handle inside a variable or store a handle in a variable for later use, that handle will let go and will be in a such state where it cannot be retrived. If this happens alot it will lead to lagg. So Leak = Handles leaking out in to never be taken back.

All handles are auto destroyed uppon map quit.


So YES. JASS still leaks. Everything you do leaks, just remember to store->Destroy.


So I still must create a line : call(udg_my_variable) ??
 
Jass isn't the magic language that provides the greatest efficiency to the person, who uses it. It has flaws, like any other language and specially for the Warcraft III engine that is really unsupportive of many events the latest engines support, the flaws' number becomes bigger. So yes, like Dynasti said, GUI and Jass equally leak.

sephiroth1234 said:
So I still must create a line : call(udg_my_variable) ??
Well, the "udg_", you won't need it for a Jass trigger (most likely). Udg_ is a prefix that defines the global substance of a variable. GUI only gives you the ability of creating global variables. They are the ones that cannot support MUI in its full potential. So, in Jass, you will instead use locals. if you use locals, it will not look like "udg_variable", it will be RemoveLocation(variable). Finally, it is not encouraged for a user to play around with locations in Jass, but GetUnitX() and GetUnitY(). Of course that depends on what you want.
 
Status
Not open for further replies.
Top