Closed GoogleCodeExporter closed 9 years ago
compact heightfield deletes the data on its' destructor. That should not leak
memory.
There are few other functions which may leak memory upon failure. I'm patching
them
as I go.
Original comment by memono...@gmail.com
on 26 Aug 2009 at 11:58
Yes but if the function fails, and the user frees memory and tries again on the
same
object, there will be a leak. It's awkward IMO for the user to have to know
that they
must delete the object and re-create it in order to not leak memory.
In fact, in my local copy I have added clear() functions to all the recast and
detour
classes so that I don't have to new them all the time. The destructor calls the
clear
function to do its cleanup, but I can also use it to reset the object to a known
state that may be used again. I personally prefer this, as opposed to new-ing
and
deleting things.
Original comment by jswig...@gmail.com
on 27 Aug 2009 at 2:03
Original issue reported on code.google.com by
jswig...@gmail.com
on 26 Aug 2009 at 5:08