• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

Custom Scripts

Status
Not open for further replies.

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
Just want to know some things. Is it really important to "remove a variable" after it's all done? If I don't have it, is it called a leak? Does it causes a crash in map after some time?
Current status of map:
800 triggers with almost no such thing as removing variable

If you don't understand what I mean, here's the thing:
CallRemoveLocation"udgName of trigger" maybe I am wrong, cause I don't know anything about scripts. But I hope that you get it.
 

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
yeah, I think that it is only for location. But for so many triggers, and yet almost none removing of location, still, when I play the map with my brother (Local Area Network), it didn't lagg to him at all.

So, what are the others, like for real, unit, trigger?
 
Level 11
Joined
Aug 1, 2009
Messages
714
yeah, I think that it is only for location. But for so many triggers, and yet almost none removing of location, still, when I play the map with my brother (Local Area Network), it didn't lagg to him at all.

So, what are the others, like for real, unit, trigger?

You need to Remove Location and Destroy Unit Group and Destroy Player Group
for it will leak somethings and cause lag to the PC. (Well, for your brother's case I think it is a Miracle.)
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,192
You must also null locals in your JASS code for objects that get destroyed. GUI fails to do this so GUI code will always leak handle IDs.

The only fix is to optimize with vexorians optimizer (it replaces the GUI BJ calls with custom function calls which do not leak (null local handles) or to write everything in JASS (or JASS compiling languages) and null all local handles of objects that get destroyed or removed.
 

Vunjo

Hosted Project: SC
Level 14
Joined
Jul 1, 2010
Messages
1,340
You must also null locals in your JASS code for objects that get destroyed. GUI fails to do this so GUI code will always leak handle IDs.

The only fix is to optimize with vexorians optimizer (it replaces the GUI BJ calls with custom function calls which do not leak (null local handles) or to write everything in JASS (or JASS compiling languages) and null all local handles of objects that get destroyed or removed.

LOL, I am using vexorians optimizer. Does that mean that there are no leaks like that anymore?
 
Status
Not open for further replies.
Top