Warcraft III resources & community, 2003–2006 · archived

Army Memory Leaks

6 posts
#1

Army Memory Leaks

Ok here is my question
Which way is best from creating the army spawns in an AOS map
1- Order the barracks to make units and set its rally point to where you want them to go
-or-
2- Create the units at a point then destroy the point

or any other that are better than my 2

Right now i can't tell what is leaking my map like crazy. Jumps up to about 250,000k in about 30 mins.

Also another Q if any one is good at fixing memory leaks, could i send you my map(although its only about 30% done) and you could take a look at the trigger and stuff and help me out by telling me what i am doing wrong to fix the leaks, what is causeing the crazy leaks and the best way to fix.

Its made in WEU.
#2
well im not so sure this would help u but in my rpg i made the other base attack you and it was all regions and spawning with conditions (this was for mine so times and units are different)

Event: every 240 seconds of the game
Actions: Spawn 2 knights (priests footman etc) at center of attackspawnpoint[gen]

and then i had this to make them attack:

Event: unit enters attackspawnpoint[gen]
condition: owner of entering unit equal to (player dark green)
Action: (somewhat like this-) unit: make unit attack-move to attackpoint[gen]

that worked for it but they got all lost on there way alot so i put more regions so they went around corners and stuff but that worked so try it (just watch out for other units on that team entering O_O)
#3
e: every x seconds of the game
c:
a: create y unit for player
order last created unit to attack move to region
#4
http://www.wc3sear.ch/viewtopic.php?t=1704

That's a thread that discusses how to reduce lag in AoS maps. I tried the methods there and didnt really notice much change, except for the special effects. Those are what I think leak the most memory (i.e. haing a special effect every time a unit spawns or dies).
-VGsatomi
#5
Concerning if you have problems seeing the units available for construction in the barracks or not, I would use the training-option

-> you can use your rally-point to move the units
-> don't need an extra-trigger for stopping spawning when barracks is killed
-> imo looks cooler with that build-effect
-> don't need regions/temporary regions (thx to Raptors post, plz correct me if this is wrong)

Of course there can be disadvantages, but I have no idea what. Perhaps someone can tell.
#6
it doesn't matter what you do if you're concerned about memory leaks as long as everytime you let warcraft create a temporary location (IE "center of regionX" or "position of unitY") you destroy that location as soon as ur done with it

so like

set temppoint = center of region
for x to y
        create units are temppoint
        order or blah blah, whatever
call destroylocation( temppoint )