HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

did I "cleanup" a thing that doesnt leak

09-02-2005, 02:52 AM#1
drdlord
in the following code did I do the right thing by calling RemoveRect on a (Playable map area) variable?

does (Playable map area) leak?

when I disable the RemoveRect line it stops a bug where my player group variable was getting corupted, can someone explain to me what's going on?

also do players have to be cleaned up, (does "Owner of (Matching unit)" need to be cleaned?) this trigger is run about 100 times a minute so I need to catch EVERY leak

Quote:
Set tempRegion = (Playable map area)
Set tempUnitGroup = (Units in tempRegion matching (((Owner of (Matching unit)) controller) Equal to Computer))
Custom script: call RemoveRect( udg_tempRegion )
If (All Conditions are True) then do (Then Actions) else do (Else Actions)
If - Conditions
(Number of units in tempUnitGroup) Greater than unitCap
Then - Actions
Custom script: call DestroyGroup( udg_tempUnitGroup )
Else - Actions
Custom script: call DestroyGroup( udg_tempUnitGroup )
Skip remaining actions
09-10-2005, 04:26 AM#2
Koga73
hmm, i dont think that the region would leak. Also... does RemoveRect work?

Code:
call RemoveLocation( udg_variable )
09-11-2005, 10:21 PM#3
Vexorian
Playable map area is a global variable .

Never remove it
09-13-2005, 07:43 PM#4
drdlord
ok, good to know, how can I tell what does leak and what doesnt? because I converted to JASS and was thinking if it's a function it leaks if it's a variable or array value it doesn't...

well that idea is shot to hell....


Also do players leak or just player groups? ie "Owner of (Matching unit)" does it leak?