Better Error Checking
Posted in General
First dog watch, 3 bells (5:34 pm)

I'm working with an older C-style API in a code project, and it often unexpectedly invalidates pointers it has returned to me. Inevitably, it's because I've used the API in a way that it's supposed to do this, but it's not well documented. But short of copying everything out of memory at the time the function returns, how can I make this safe. And even tougher, how do I make this thread-safe?

Leave a Comment »