HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

reals and locations...

10-07-2006, 01:48 AM#1
darkwulfv
Ok, I know locations are atrocious leakers, and I know how to patch up real leaks sooo...

Collapse JASS:
set SFX[9] = AddSpecialEffect("Doodads\\Cinematic\\TownBurningFireEmitter\\TownBurningFireEmitter.mdl", x, y)

does this leak? (assuming x and y are local reals, and they get set to 0 at the end)
10-07-2006, 01:55 AM#2
karukef
My oh my... who told you you have to set reals to 0?

Reals cannot leak.
10-07-2006, 01:56 AM#3
darkwulfv
Oh... Duh. I just set them to 0 for good practice. idk why. So this doesn't leak? if not, then this is a MUCH better method then my old one, which was to destroy the locations created after each one, which was a pain in the fucking ass.
10-07-2006, 02:01 AM#4
karukef
Locations must be destroyed after you are done using them.

Not reals.

Don't set reals variables to 0 when you are done with them. It is 100.2% useless.
10-07-2006, 02:05 AM#5
darkwulfv
ok works for me :D
10-07-2006, 03:21 AM#6
Vexorian
sure it works.

Collapse JASS:
 loop
      exitwhen true
 endloop

Also works, but that does not make it less useless