Programming
C++ - delete and null pointer
구리z
2011. 9. 29. 11:53
delete 시에는 아래와 같이 NULL 인지 아닌지 체크해줄 필요가 없다.
if (p) //useless
{
delete p;
}