[ODE] Lots of warnings when compiling version 0.039
Russ Smith
russ at q12.org
Fri Jul 11 14:18:01 2003
okay, first off ODE doesn't use the standard library 'new', it uses its
own one in the dBase base class. that's a call to dAlloc(), which the user
can redefine. so no exceptions will ever be thrown (if this is not true
for some part of ODE then that's a bug). even if they were thrown, you
would need a separate exception handler for every API function that can
allocate memory, and that this code would have to be portable across
different C++ compilers / standard libraries. is it worth the pain?
also, with the C interface bare in mind that C++ exceptions will not be
able to cross the API boundary, or at least they can't with the
current linux/gcc ABI.
> Of course, when a computer runs out of virtual memory, there's little an
> application can do but exit.
exactly, which is why i don't have any checks there. my own approach (for
linux applications) is to install a segv handler that attempts to save
any work in progress then exits gracefully. that's much simpler and also
catches other bugs.
russ.
--
Russ Smith
http://www.q12.org/