T
TBass
Hi,
Switching some code from C to C++, and I have a destructor question:
In the C code, when the program wants to close and free all memory, I
have them call a Close function. The linked-lists get free'd.
In the C++ versions, my class has a linked list items of another
class, which also has a linked list of another class. I was going to
add a Close function to the classes, but is the C++ way to just put
the delete statements in the destructor and let it get handled
automatically?
Thanks in advance,
T
Switching some code from C to C++, and I have a destructor question:
In the C code, when the program wants to close and free all memory, I
have them call a Close function. The linked-lists get free'd.
In the C++ versions, my class has a linked list items of another
class, which also has a linked list of another class. I was going to
add a Close function to the classes, but is the C++ way to just put
the delete statements in the destructor and let it get handled
automatically?
Thanks in advance,
T