Texttags recycle themselves ???

vuongkkk

New Member
Reaction score
1
What is the real things Blizzard do behind handling texttags ???

Texttag extends handle, it has function CreateTexttag and DestroyTexttag.
And i heard someone that "Texttags recycle themselves under the hood." from here

So making a system which recycles texttags is not neccessary?

If that is true, so what type needs recycle, what doesn't need?
 

Dirac

22710180
Reaction score
147
As far as i know text tags that aren't permanent get destroyed after their lifespan ends. Therefore no need to recycle.
 

Sgqvur

FullOfUltimateTruthsAndEt ernalPrinciples, i.e shi
Reaction score
62
vuongkkk:

1. If that is true, so what type needs recycle, what doesn't need?

1. Well generally if a type can be created and reused/recycled multiple times (the [ljass]trigger[/ljass] is an example of a type that can't be used/recycled multiple times) then it should be:

List of recyclable types (I think should be/can be recycled): [ljass]unit[/ljass]s (dummies, projectiles, etc.), [ljass]group[/ljass]s, [ljass]timer[/ljass]s, [ljass]rect[/ljass]s, [ljass]location[/ljass]s, [ljass]force[/ljass]s [who uses those =)], [ljass]multiboard[/ljass]s, [ljass]leaderboard[/ljass]s, [ljass]camerasetup[/ljass]s, [ljass]hashtable[/ljass]s, [ljass]gamecache[/ljass]s and probably others I can't find right now.

I did not include [ljass]lightning[/ljass]s because they probably "recycle themselves under the hood" or are just too cheap to create/destroy.

And of course my all time favorite type: the [ljass]buff[/ljass] type, which is kinda like matter in a way that it can not be created or destroyed =).
 

vuongkkk

New Member
Reaction score
1
As far as i know text tags that aren't permanent get destroyed after their lifespan ends. Therefore no need to recycle.

If you are correct then
CreateTexttag = recycle texttag
A lifespan of a texttag ends = DestroyTexttag = store in stack

vuongkkk:

1. If that is true, so what type needs recycle, what doesn't need?

List of recyclable types (I think should be/can be recycled): [ljass]unit[/ljass]s (dummies, projectiles, etc.), [ljass]group[/ljass]s, [ljass]timer[/ljass]s, [ljass]rect[/ljass]s, [ljass]location[/ljass]s, [ljass]force[/ljass]s [who uses those =)], [ljass]multiboard[/ljass]s, [ljass]leaderboard[/ljass]s, [ljass]camerasetup[/ljass]s, [ljass]hashtable[/ljass]s, [ljass]gamecache[/ljass]s and probably others I can't find right now.

I did not include [ljass]lightning[/ljass]s because they probably "recycle themselves under the hood" or are just too cheap to create/destroy.

And of course my all time favorite type: the [ljass]buff[/ljass] type, which is kinda like matter in a way that it can not be created or destroyed =).

All we said is "If", hope some good guy to make a benchmark
And help us to find out recycle texttag and not, they have any difference at speed
Or show me how to make a benchmark at least
 

Dirac

22710180
Reaction score
147
If you are correct then
CreateTexttag = recycle texttag
A lifespan of a texttag ends = DestroyTexttag = store in stack
No i meant more like

CreateTexttag = create new one
A lifespan of a texttag ends = DestroyTexttag.

Same way you would destroy a group, trigger or any other handle. They don't actually recycle, they get automatically destroyed
 

WaterKnight

Member
Reaction score
7
You can have up to 100 texttags, their ids ranging from 99-0 (counting downwards). When you destroy a text tag/it's life span ends, its id is available again, being thrown at the top of the stack. This means, you will first get the latest released ids back. If all 100 texttag slots are used up, CreateTextTag() will return null/TextTag(0), it's the same. You do not need to nullify texttag variables as they are local objects.
 

Bribe

vJass errors are legion
Reaction score
67
Don't you need to both disable permanence as well as give it a lifespan, to destroy it?
 

vuongkkk

New Member
Reaction score
1
Thanks all. I got it now. So i dont need to make a recycle texttag at all and destroy and create it again. Cause of my system handles all thing manually to have full control !
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top