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

Check memory leaks

Status
Not open for further replies.
Level 10
Joined
Mar 17, 2012
Messages
579
Hi everyone.

I've been making a small hero defence game for a few weeks and I have faced a problem with bad FPS in the mid game. It's weird as I have made everything clear enough with all cleanups necessary.
And also I have noticed that the most lags I get on big units and not on all of them.

Is there any sophisticated way to check if my triggers have leaks?

P.S. Checking 6k+ lines is not very pleasant, so there should be an automatised way. I'm counting on you :)
 
Level 13
Joined
Oct 12, 2016
Messages
769
If you're using GUI, I can spot any problems right away for you.
If it's JASS, I'll have to see where you have point/unitgroup/playergroup/SFX/tempregions/etc. used as globals.

If you got a LOT of dummy units that aren't being removed, this could cause FPS drops over time, too.
 
Level 10
Joined
Mar 17, 2012
Messages
579
If you're using GUI, I can spot any problems right away for you.
If it's JASS, I'll have to see where you have point/unitgroup/playergroup/SFX/tempregions/etc. used as globals.

If you got a LOT of dummy units that aren't being removed, this could cause FPS drops over time, too.

I use GUI so you could spot it right away, but I have way too many triggers. I mean, yeah, it's okay to check every single trigger, but it's a last resort :)

About dummy units: if I use a trigger that removes a unit when it dies, is it considered a cleanup?

P.S. Should I give you my map for checking? :)
 
Level 13
Joined
Oct 12, 2016
Messages
769
Yea, I can give it a glance over and see what's up.
Usually for dummy units in spells, I just use an expiration timer. Basically converts the unit into a summoned unit and it automatically is removed after the timer expires.

Checking thousands of lines is easy to do when it's sorted properly and you know what to look for.
 
Status
Not open for further replies.
Top