HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Units don't leak?

07-13-2009, 04:21 PM#1
Cheezeman
Hey I recieved this quote just some minutes ago:
Quote:
BTW units DON'T leak.
Who ever told you that knows nothing of jass or memory leaks.
If units would leak there would be a call DestroyUnit() function and there isn't one.
Only thing you might be refering to is the nulling of the local units which is again a minor thing to do.
How much of this is true?
07-13-2009, 04:29 PM#2
DioD
send this quote to 5 (five) friend via ICQ or e-MAIL and real love will find you.

if dont you will be cursed forever!
07-13-2009, 04:39 PM#3
Cheezeman
Quote:
Originally Posted by DioD
send this quote to 5 (five) friend via ICQ or e-MAIL and real love will find you.

if dont you will be cursed forever!
Was that a joke or real spam?
07-13-2009, 04:42 PM#4
Rising_Dusk
Just because it doesn't have a DestroyUnit does not mean it doesn't leak..
07-13-2009, 04:42 PM#5
Bobo_The_Kodo
Quote:
Was that a joke or real spam?
Maybe you should re-read the quote you posted here, and see if it even makes sense

Edit: (Hint: It Doesn't)
07-13-2009, 04:46 PM#6
Troll-Brain
In fact RemoveUnit is a fake function , it simply move the unit outside the map, but don't destroy it.
07-13-2009, 04:48 PM#7
Bobo_The_Kodo
Quote:
In fact RemoveUnit is a fake function , it simply move the unit outside the map, but don't destroy it.

The units just eventually commit suicide, destroying themselves.
Therefore you do not need a "DestroyUnit" function :)

It usually happens approximately 88 seconds after the unit falls down, pretending to be dead. It may vary depending on the map.
07-13-2009, 04:49 PM#8
Kwah
Troll'ed.
07-13-2009, 04:49 PM#9
PurplePoot
Who said that, anyways?
07-13-2009, 05:01 PM#10
DioD
there is no such quote on wc3c (tested)
Hidden information:


07-13-2009, 05:02 PM#11
Toadcop
lol can someone explain why melee games require more and more memory while playing it ? =O
07-13-2009, 05:04 PM#12
Troll-Brain
Quote:
Originally Posted by Toadcop
lol can someone explain why melee games require more and more memory while playing it ? =O
I've a good answer, there is some gui stuff inside them :p
07-13-2009, 05:04 PM#13
DioD
Toadcop
Ancient curse?
07-13-2009, 05:08 PM#14
DioD
well, i go sleep now, and i will test unit leaks.

map with only this code will run for night (8 hours)
Collapse JASS:
function MapCounterFoot takes nothing returns nothing
    if GetRandomInt(1,2) == 2 then
        if GetRandomInt(1,2) == 2 then
            call IssuePointOrder(CreateUnit(Player(1),'u001',0.0,10240.00,270.0), "attack",0.0,-10240.0)
        endif
        call IssuePointOrder(CreateUnit(Player(1),'u001',0.0,10240.00,270.0), "attack",0.0,-10240.0)
    else
        if GetRandomInt(1,2) == 2 then
            call IssuePointOrder(CreateUnit(Player(2),'u001',0.0,-10240.00,90.0), "attack",0.0,10240.0)
        endif
        call IssuePointOrder(CreateUnit(Player(2),'u001',0.0,-10240.0,90.00), "attack",0.0,10240.00)
    endif
endfunction

//===========================================================================
function InitTrig_Units takes nothing returns nothing
    set gg_trg_Units = CreateTrigger(  )
    call TriggerRegisterTimerEventPeriodic( gg_trg_Units, 1.00 )
    call TriggerAddAction( gg_trg_Units, function MapCounterFoot )
endfunction
Attached Images
File type: jpgBEFORE.JPG (21.5 KB)
07-13-2009, 05:22 PM#15
Viikuna-
I think grim001 said something like units "leak" even when they dont leak.

That How to instantly set units facing -thread.