Craziness in C++

// The second call of p->objectOf()->display() in main shows an object
// of value 13 which is the value of the object pointed to by q.  But
// p had been "deleted" by p->popObject() so it should not even exist!

#include < stdio.h >
#include < string.h >
#include < stdlib.h >
#include < iostream.h >

class Object
{
private:
   int number;

public:
   Object (int n) {  number = n;  }
   void display() {  cout << number << " ";  }
   int value()    {  return number;  }
};

class Cell
{
private:
   Object *object;
   Cell   *next;
   Cell   *forward;

public:
   Cell (Object *obj)
   {
      object = obj;
      next = NULL;
      forward = NULL;
   }
   void setNext(Cell *nxt)    { next = nxt; }
   void setForward(Cell *fwd) { forward = fwd; }
   Object *objectOf() { return object; }
   Object *popObject()
   {
      Object *obj = object;
      if (forward != NULL) forward->setNext(next);
      if (next != NULL) next->setForward(forward);
      delete this;
      return obj;
   }
};

void main()
{
   Cell *p = new Cell(new Object(10));
   p->objectOf()->display();
   p->popObject();
   Cell *q = new Cell(new Object(13));
   p->objectOf()->display();
}