Because the function is not doing anything with the object's member data or the this
pointer.
It's like calling a function
void check(object *self)
{
std::cout<<"I am doing ok..."<
with an invalid pointer as the self
argument.
There is a double delete though, which can crash in some environments.