C++: what's the correct way to delete objects inherited from RO classes?

Hello,

I have seen from time to time, without any reason I can identify, that using delete the_object; produces an Invalid Pointer Operation. Using the_object->Release(); does not.

As the objects are created with new, and, in this cases, are not objects that will be serialized (say, they are created inside a function but never returned to the client), I should delete them as any other C++ object. But for some of these objects I just keep getting the Invalid Pointer exception.

Any idea or rule to follow regarding this?

Scrap this. delete works fine for this kind of structures, it was a mistake on my part.