Magentix
if (OP.statement == false) postCount++;
- Reaction score
- 107
Just a question that popped in my mind:
If you can store a unit's HandleId in a hashtable and you can also store a unit in a hashtable... what happens when the unit dies and you didn't have a trigger to "clean up" after unit death?
Does the hashtable get eventually cluttered like that with dead integer/unit references?
Also, wat if I use hashtables to replace an outdated (according to WC3C) system like PUI?
[ljass]call SaveInteger(ht,StringHash("UnitStruct"),GetHandleId(someUnit),structPointer)[/ljass]
[ljass]set someStruct = LoadInteger(ht,StringHash("UnitStruct"),GetHandleId(someUnit))[/ljass]
Would I risk getting back the wrong stuff or null structs?
If you can store a unit's HandleId in a hashtable and you can also store a unit in a hashtable... what happens when the unit dies and you didn't have a trigger to "clean up" after unit death?
Does the hashtable get eventually cluttered like that with dead integer/unit references?
Also, wat if I use hashtables to replace an outdated (according to WC3C) system like PUI?
[ljass]call SaveInteger(ht,StringHash("UnitStruct"),GetHandleId(someUnit),structPointer)[/ljass]
[ljass]set someStruct = LoadInteger(ht,StringHash("UnitStruct"),GetHandleId(someUnit))[/ljass]
Would I risk getting back the wrong stuff or null structs?