HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Quick question on leaks

04-19-2007, 04:16 PM#1
zen87
Collapse JASS:
function SomeFunc takes nothing returns nothing
 local unit u = CreateUnit(p,'n000',x,y,0)
 local effect e = AddSpecialEffectTarget("Abilities\\Spells\\Human\\AerialShackles\\AerialShacklesTarget.mdl",u,"origin")
    call RemoveUnit(u)
 set u=null
 set e=null
endfunction
kay the situation is like above, i removed the unit with the special effect still attached to it (note that the special effect is NOT destroyed using the DestroyEffect(e) native), my question is, since a removed unit will not cause any leaks, then will the effect that still attached to it cause any leaks when the unit is removed ?

+rep to the fastest answer :D
04-19-2007, 04:39 PM#2
Earth-Fury
http://wc3campaigns.net/showthread.p...ghlight=effect
Quote:
Originally Posted by Ammorth
An effect attached to a unit that is removed will still leak unless destroyed. An effect attached to a dying unit still exists until the effect is destroyed.
04-19-2007, 04:45 PM#3
zen87
wow ty for the ans :D +rep

case closed