HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

Quick Leak Question

04-05-2006, 02:20 AM#1
FatalError
Just a quick question about leaks: Do they apply to local variables as well? I'm pretty sure they do, but someone told me they don't... :/
04-05-2006, 02:26 AM#2
mmx2000
Not sure about JASS but I also thought that the benefit of most local var's besides being MUI, are destroyed at the end of the function they are scoped to.
04-05-2006, 03:23 AM#3
FatalError
Quote:
Originally Posted by mmx2000
Not sure about JASS but I also thought that the benefit of most local var's besides being MUI, are destroyed at the end of the function they are scoped to.
Yeah you're right...I just saw a script that cleared out all locals in the function at the end of the function...I guess he just wasted his time. XD
04-05-2006, 04:57 AM#4
PipeDream
Locals are really !#%^^%# broke. You have to deallocate everything of handle type that isn't visible in the game, mostly locations, groups and finished SFX. Also, for every handle that points to a temporary object, you have to fix this.
04-05-2006, 05:04 AM#5
FatalError
Quote:
Originally Posted by PipeDream
Locals are really !#%^^%# broke. You have to deallocate everything of handle type that isn't visible in the game, mostly locations, groups and finished SFX. Also, for every handle that points to a temporary object, you have to fix this.
Oh, I didn't realize that...thanks! Rep for you. :)