[ODE] Lots of warnings when compiling version 0.039

Martin C. Martin martin at metahuman.org
Fri Jul 11 14:01:02 2003


Frederic Ferland wrote:
> 
> Just downloaded the new ODE version and I get a whole lot of warnings 

The "no matching operator delete found" is the main warning I get, and it
actually points to a possible memory leak.  To fix it would require the
addition of exception handling, which Russ has wanted to avoid.

Russ, in code like this:

a = new foo;
b = new bar;

if the second "new" runs out of memory, it will throw an exception and the
memory in the first call will never be freed.  Of course, when a computer
runs out of virtual memory, there's little an application can do but
exit.  Still, given that the C++ spec specifies that exceptions may be
thrown in your code, would you be against me putting in a handler to clean
up properly when they happen?

- Martin