I have understanding (probably wrong) that memory becomes free anway on application exit, so what's the point of calling delete on something that lives as long as program is running?
for example this sample code doesn't delete a pointer:
int main()
{
int p = new int;
return 0;
}
will memory pointed by pointer 'p' be freed to system once the program exits?