destructor or free

  1. A

    C++ newbie question: how to use a destructor/free memory in a 2D dynamic array class?

    Hi everyone: I'm confused about how to use a destructor/free memory in a 2D dynamic array class. If I define a destructor in the class, I don't have to write any code in main() to free the memory, right? It just happens automatically? Thanks for any help!
  2. A

    C++ newbie question: how to use a destructor/free memory in a 2D dynamic array class?

    Hi everyone: I'm confused about how to use a destructor/free memory in a 2D dynamic array class. If I define a destructor in the class, I don't have to write any code in main() to free the memory, right? It just happens automatically? Thanks for any help!
Back
Top