freeing objects in OpenFOAM
Howdy Foamers:
In a function I declared an instance of DynamicList. Textbook C++ told me that I should be deallocating this in the class destructor or, when it is declared in a function, I should delete it once it is not used anymore. However, I don't see anything to that effect. The question is, do I have to do this, or these are being done "ad hoc" somewhere in the OpenFOAM code? Thanks in advance, Ed. |
Heap memory is deallocated in the destructor of List class which DinamicList class is derived from. Take a look:
template<class T> Code:
Foam::List<T>::~List() |
Dear Sergei:
It looks like I still have to learn how to traverse the OpenFOAM object inheritance tree. Thank you very much for pointing that out and this put my mind at ease with your response. Sincerely yours, Gerry. |
All times are GMT -4. The time now is 08:23. |