Frozenhelfir
set Gwypaas = Guhveepaws
- Reaction score
- 56
I remember reading somewhere that text tags don't leak if they don't have a permanent life span. I don't remember the source, or if it is credible. Basically what I'm after is "does this code leak?"
Do I have to null the texttag at any point? The method only returns so I can null and destroy it later. Is this even necessary with the texttag not being permanent? Do I have to call DestroyTexttag() if the lifespan isn't permanent?
JASS:
static method MakeTextTag takes string s, real velocity, unit t, integer r, integer g, integer b returns texttag
local texttag te = CreateTextTag()
call SetTextTagText(te, s, 0.024)
call SetTextTagPos(te, GetUnitX(t), GetUnitY(t), 0.00)
call SetTextTagColor(te, r, g, b, 255)
call SetTextTagVelocity(te, 0, velocity /*+(i*.01)*/ )
call SetTextTagVisibility(te, true)
call SetTextTagFadepoint(te, 1)
call SetTextTagLifespan(te, 2)
call SetTextTagPermanent(te, false)
return te
endmethod
Do I have to null the texttag at any point? The method only returns so I can null and destroy it later. Is this even necessary with the texttag not being permanent? Do I have to call DestroyTexttag() if the lifespan isn't permanent?