Re: EotA--memory leaks out the ass
Posted: August 10th, 2007, 11:42 pm
So, I found this today.
Thanks blizz, instead of returning bj_lastCreatedGroup, you make a copy and return it for no good reason. Oh i'm sure you had some good reason at some point in development, but this kind of unexpected behavior needs a hell of a lot more documentation.
This should resolve a long standing memory leak i've known about but been unable to find, back from my old "I'm just going to use GUI becuase this map will never become large enough to make it worth my time to learn jass" times. This one's pretty minor except for long games (in my experience anyway), and doesn't relate to UD issues. But god this one annoyed me for years.
DarnYak
Code: Select all
//===========================================================================
function GetLastCreatedGroupEnum takes nothing returns nothing
call GroupAddUnit(bj_groupLastCreatedDest, GetEnumUnit())
endfunction
//===========================================================================
function GetLastCreatedGroup takes nothing returns group
set bj_groupLastCreatedDest = CreateGroup()
call ForGroup(bj_lastCreatedGroup, function GetLastCreatedGroupEnum)
return bj_groupLastCreatedDest
endfunction
This should resolve a long standing memory leak i've known about but been unable to find, back from my old "I'm just going to use GUI becuase this map will never become large enough to make it worth my time to learn jass" times. This one's pretty minor except for long games (in my experience anyway), and doesn't relate to UD issues. But god this one annoyed me for years.
DarnYak