You can't call delete on a stack allocated object. delete is to be used on objects allocated with new. Notice that delete doesn't delete the pointer, but the object it points to. Example:
1 2 3
int* a = newint[10];
delete[] a;
a = NULL; // a still exists, but it's a dangling pointer now, so we set it to NULL (or 0)