• 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.
  • The Hive's 22nd Icon Contest: Creep Abilities is now concluded, time to vote for your favourite set of icons! Click here to vote!
  • ✅ The POLL for Hive's Texturing Contest #34 is OPEN! Vote for the TOP 3 SKINS! 🔗Click here to cast your vote!
  • ✅ The POLL for Hive's Techtree Contest #20 is OPEN! Vote for the TOP 3 FACTIONS! 🔗Click here to cast your vote!

[JASS] Memory leakage

Status
Not open for further replies.
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.
 
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.
Back
Top