• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!

HIVE

Cokemonkey11
Cokemonkey11
Yes, nominally, they leak. They are like structs in vjass.

Of course, if you have one static HashMap that is reused by your application, then it might be "right" to leak them
Lake
Lake
Holy moly, good I stumpled upon on this :D
Chaosy
Chaosy
On that topic, same for vectors then right? that's inconvenient considering it's basically like Locations then. Though with nicer syntax for destruction
Lake
Lake
I believe it's different because vectors are tuples. But don't have a lot of experience in this, but that's how I understand it; tuples aren't considered "objects"

EDIT: You indeed don't have to destroy them - check the manual under tuples
Cokemonkey11
Cokemonkey11
Lake is correct. tuple-types aren't backed by struct-like allocators - they're just syntactic sugar for multiple variables.
Chaosy
Chaosy
What about event closures? can I use gettriggertrigger.destr() ?
Top