You are not logged in.

#1 2007-05-13 11:25:17

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

c++ classes

i want to free some memory from deleting a certain class:

cObject* a=new cObject();
delete a;

does 'delete' call the destructor of object a and does a then point to NULL?

Thanks in advance,
billy

Offline

#2 2007-05-13 13:00:01

bboozzoo
Member
From: Poland
Registered: 2006-08-01
Posts: 125

Re: c++ classes

1. it does call the destructor of given object
2. a is not NULL, you need to set it on your own

Offline

#3 2007-05-13 15:34:40

billy
Member
From: Slovenia
Registered: 2006-09-13
Posts: 164

Re: c++ classes

thanks

Last edited by billy (2007-05-13 15:34:57)

Offline

Board footer

Powered by FluxBB