int main() {
int *p = new int;
cout << p << endl;
p = new int;
cout << p << endl;
delete p;
return 0;
}

は間違ってますか?
最初のpはリークになる?