Is there any equivalent to this in C or some mechanism that makes cleaning things up easier?

Yeah, it's called C++ . It has exceptions, just like in Java. And, even if you need the C interface, you can still create extern "C" functions in C++ and get that exception goodness. Oh, and smart pointers, which will save you from having to call Release() anyway.

Alternatively, there's 'goto'. Ick.
_________________________
-- roger