Warcraft III resources & community, 2003–2006 · archived

»»» MEMORY LEAK! ««« please help (and get Credits in my map)

6 posts
#1

»»» MEMORY LEAK! ««« please help (and get Credits in my map)

AARGH! i got a big problem: i got huge memory leak in my map! i tried to fix it by destroying the points and unit(group)s etc. but it doesnt help really much..
did i do it wrong? or is there something i forgot?

the way i tried is like this:

Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
        Unit Group - Pick every unit in StarvingUnits and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                Set PingStarvingUnits = (Position of (Picked unit))
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                Point - Remove PingStarvingUnits
                Unit Group - Destroy unit group StarvingUnits

and

Breed
    Events
        Unit - A unit Is issued an order targeting a point
    Conditions
        Or - Any (Conditions) are true
            Conditions
                (Owner of (Ordered unit)) Equal to Neutral Hostile
                (Owner of (Ordered unit)) Equal to Neutral Passive
    Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Crab Small
                (Number of living Crab Big units owned by Neutral Passive) Less than 50
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Set mana of (Ordered unit) to 0.00%
                Unit - Replace (Ordered unit) with a Crab Big using The old unit's relative life and mana
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Crab Big
                (Number of living Crab Small units owned by Neutral Passive) Less than 50
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 2 Crab Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Raccoon Small
                (Number of living Raccoon Big units owned by Neutral Passive) Less than 25
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Unit - Set mana of (Ordered unit) to 0.00%
                Unit - Replace (Ordered unit) with a Raccoon Big using The old unit's relative life and mana
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Raccoon Big
                (Number of living Raccoon Small units owned by Neutral Passive) Less than 25
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 2 Raccoon Small for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Fish
                (Number of living Fish units owned by Neutral Passive) Less than 125
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 1 Fish for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions
        If (All Conditions are True) then do (Then Actions) else do (Else Actions)
            If - Conditions
                (Unit-type of (Ordered unit)) Equal to Snake
                (Number of living Snake units owned by Neutral Hostile) Less than 15
                (Mana of (Ordered unit)) Equal to 100.00
            Then - Actions
                Set SpawnPointNeutralUnits = ((Position of (Ordered unit)) offset by 50.00 towards (Facing of (Ordered unit)) degrees)
                Unit - Create 1 Snake for (Owner of (Ordered unit)) at SpawnPointNeutralUnits facing (Facing of (Ordered unit)) degrees
                Point - Remove SpawnPointNeutralUnits
                Unit - Set mana of (Ordered unit) to 0.00%
            Else - Actions

did i do something wrong?
any help is appreciated
~MP
#2
Destroy the point after every accurance, then why you're done with the point, destroy and nullify it:

custom script:

set SpawnPointNeutralUnits = null
#3
it would actually be

set udg_SpawnPointNeutralUnits = null
#4
thnx
what exactly is nullifying? aint destroying enough?
~MP
#5
so its more like this?

Starving
    Events
        Time - Every 2.00 seconds of game time
    Conditions
    Actions
        Set StarvingUnits = (Units in (Playable map area)((((Unit-type of (Matching unit)) Equal to Brave) and (((Matching unit) is alive) Equal to True)) and ((Mana of (Matching unit)) Equal to 0.00)))
        Unit Group - Pick every unit in StarvingUnits and do (Actions)
            Loop - Actions
                Unit - Set life of (Picked unit) to ((Life of (Picked unit)) - 5.00)
                Set PingStarvingUnits = (Position of (Picked unit))
                Cinematic - Ping minimap for (Player group((Owner of (Picked unit)))) at (Position of (Picked unit)) for 1.00 seconds, using a Flashy ping of color (100.00%, 0.00%, 0.00%)
                Point - Remove PingStarvingUnits
        Unit Group - Destroy unit group StarvingUnits
        Custom script: set udg_StarvingUnits = null
#6
hmm.. it still doesnt help any more.. please someone help me..
maybe i could give someone the map, so he can see in the triggers what's wrong?
please send me an email if you want the map:
[email protected]

btw.. i NEVER protect my maps.. im against it
but, i used WEU for this map, so you cant open it with the normal WE

please help as fast as possible!
any help is appreciated!!

~MP Productions©