HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Getting Rid Of Memory Leaks In GUI

01-27-2005, 04:23 PM#46
Cubasis
Wiebe is quite on the spot on most of this.

The problem with this however: "Custom script: Call RemoveLocation( udg_WaterCannonTempPoint )"

is that JASS is case sensitive, so "Call" is not the same as "call", and the correct keyword for calling functions is exactly: "call". See if that fixes the prob.

~Cubasis
04-16-2005, 10:56 AM#47
EdwardSwolenToe
I want to verify the gains of setting a handle or whatever to null after using it. What do i expect to gain from it? memory gain?
04-22-2005, 05:32 AM#48
Daelin
Ok, its time I removed all those leaks. I will make sure to give a link to this into my JASS tutorial.

~Daelin
06-26-2005, 11:07 PM#49
MeTaCo
Very nice tutorial, but I got a question in reguards, what if you put a timer in last created unit, would it get rid of a memory leak alone? or do you still have to call a trigger to remove it, and how do you remove data in arrays?
07-04-2005, 04:01 PM#50
Guest
hope I don't sound stupid here, but how do I remove a local variable for an integer I created?

And the same for unittypes?
07-16-2005, 08:41 PM#51
keeperofstormz
ok ive got a shooter map that has multiple firings of sounds whenever each unit shoots, so thats 12 players shooting creating 10+ sounds every time.. should i\how can i remove the sounds and is it causing a memory leak? becuase ive gone through every trigger fixing every mem leak i can find, yet something still lags it up late game.. help?
10-21-2005, 12:08 AM#52
yacapo
Iv'e made a map that runs well and is 100% complete, aside from the fact that tons of people are having problems with it lagging. I just read the tutorial on memory leaks, but don't quite know if my triggers are causing any. I have multiple looping triggers that run every 30 seconds of game time. These triggers create units in perminent regions, and have them attack-move to other perminent regions. Is this a cause of memory leaks? I'm not sure, because everything I have read about leaks comes from temporarily created locations that must be destroyed. Also, I have made custom spells that use perminent regions on the map. For example: every time (X) spell is cast, move (B) region on position of unit of ability being cast. After this, a trigger is turned on that creates special effects in the region, and after a few seconds that trigger is turned off. Do I have to actively destroy the special effects of this trigger even tho the special effects aren't visible after the trigger is turned off? I am dying here. Please help me. I will gladly provide an unprotected version of my map to anyone who can help.
-Yacapo
10-25-2005, 03:57 PM#53
MP Productions
hey thnx i really need to fix the memory leak of my map..
im not so good in english, so maybe i haven't read it good, but is it true that triggers like:
Code:
Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Unit Group - Pick every unit in (Units in (Playable map area) matching (((Mana of (Matching unit)) Equal to 0.00) and ((((Matching unit) is Mechanical) Not equal to True) and (((Owner of (Matching unit)) Not equal to Neutral Passive) and ((Owner of (Matching unit)) Not equal to Neutral Host and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
leak?
so i need to create a variable of the unit group?
like this?
Code:
Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set TempStarvingGroup = (Units in (Playable map area) matching (((Unit-type of (Matching unit)) Equal to Brave) and ((Mana of (Matching unit)) Equal to 0.00)))
        Unit Group - Pick every unit in TempStarvingGroup and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 1.00)
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Warning ping of color (100.00%, 100.00%, 100.00%)
but do i need to destroy it every time?
plz help
thnx
MP
10-31-2005, 02:22 PM#54
MP Productions
hey, it doesn't work well... i got a map, with many triggers with an periodic event.
in most of those triggers, all units in playable map area matching (whatever) conditions will
or change custom value
or change mana
or what ever

the events are like
every 2 seconds of gametime

does these triggers leak? i thought of yes, but i tried to put them into a variable and destroy them after using, but it doesnt really help..

can you please post an example of a 'non-memory-leaking' trigger that does the following things:

Events:
Every 2 sec of game time
Conditions:
Actions:
Pick every unit in playable map area matching (matching unit equal to Footman and matching unit's mana equal to 0)
-kill picked unit

thnx in advance
~MP
11-21-2006, 03:00 AM#55
Feroc1ty
Nice, i love you,
11-21-2006, 04:29 AM#56
player_72985
~sigh~ Jokes-On-You, please read the rules, no reviving old threads that are over 1 year old =/



on a side note, is it just me, or has there been A LOT of really old as heck thread revivals lately...seems rather odd...
08-13-2007, 09:06 PM#57
ClichesAreSt00pid
Honestly, if you're not making a really basic map like footmen wars, JASS is definately the way to go. It's 1,000 times easier to do anything and fixing memory leaks are incredibly easy.
06-11-2009, 11:47 AM#58
Sandbek
Im sorry for necroing, but i dont know where else to post this.
How do i prevent a trigger refering to a single units facing angle from leaking? I tried using call DestroyGroup(udg_TempUnitGroup) but that did not work.