• 🏆 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!

Memory leak help and some others

Status
Not open for further replies.
Level 7
Joined
Dec 17, 2017
Messages
134
I have some questions guys:-
1. Do models also have the goddamn tendency to not work in older versions than the version it was created on?
2. I need some leak help. Well, I am creating a map where some units spawn from a same region and ordered to go to some region. Do I have to use variables and custom script and call after each spawn? Or do I have to call after all the spawns? For example:
A Knight spawns from Region A and ordered to move to Region B
Wait 2.00 seconds
A Rifleman spawns from the same Region A and moved to Region B.
Do I have to use Custom script and destroy points after each spawn?
3. Is there any third party Leak Displayer? (Which shows the leaks created by GUI triggers)

Thank you!
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,202
1. Do models also have the goddamn tendency to not work in older versions than the version it was created on?
Yes, especially if they use textures larger than 512x512.
2. I need some leak help. Well, I am creating a map where some units spawn from a same region and ordered to go to some region. Do I have to use variables and custom script and call after each spawn? Or do I have to call after all the spawns? For example:
For each JASS object you create you need to remove it, with very few exceptions. For example after each location you create you have to call RemoveLocation on it or it will leak. Local declared local handle variables with common recycled handle types like location must also be nulled before function return. Do note that GUI compiles to JASS on map save so you are always using JASS.
Do I have to use Custom script and destroy points after each spawn?
Not if the points are constant, as in you assigned to them to a variable on map initialization and are then using that variable to reference them rather than creating new location (GUI point) objects. In such case you may never need to remove the locations.
3. Is there any third party Leak Displayer? (Which shows the leaks created by GUI triggers)
Ralle made one that used to be part of this site. Not sure what happened to it... Otherwise spend a day or so to learn JASS and all the leaks become obvious.
 
Status
Not open for further replies.
Top