// -- Complex types and automatic deletion --// // Many native types represent "complex" objects (i.e. larger than 4 bytes). The script language// automatically keeps track of these objects and deletes them from memory when they are no longer// used (that is, when nothing in the script references them any longer). The types which benefit// from automatic deletion are://// abilcmd, bank, camerainfo, marker, order, playergroup, point,// region, soundlink, string, text, timer, transmissionsource, unitfilter, unitgroup, unitref,// waveinfo, wavetarget//// Other object types must be explicitly destroyed with the appropriate native function when you// are done using them.
That basically means that you dont need to destroy sounds at all. There isnt even a function for that.
My question is.
Does the action - Stop sound actually destroy the sound?
In my image my sound array is a bunch of references to sounds that are being played around the map (to be specific they are actually looping sounds.)
After destroying stoping the reference from playing .... the variable BeamSounds[i].... is not set to = NoSound
Where as If i do a remove on a Unit. References to the unit in variables will = NoUnit with out me having to set it to = NoUnit
I do a lot of conditional checks on these things.
I dont want to be creating a memory leak here.
@SouLCarveRR:
Quoting from natives.galaxy:
That basically means that you dont need to destroy sounds at all. There isnt even a function for that.