I've got a question about destructors in c++.
I've got a class like this :
class X {
private:
string m_instanceName
string m_path;
ConnexionHashMap m_connexions;
Module** m_moduleType;
Powerdomain* m_powerDomain;
Module ** m_father;
};
Here are some information concerning ConnexionHashMap :
typedef hash_map<const string, Connexion, strptrhash, strptrequal> ConnexionHashMap;
struct Net{
string name;
vector<string> connectedPins;
bool isPin;
};
typedef struct Net Net;
struct Connexion{
string pin;
Net* net;
};
typedef struct Connexion Connexion;
If I don't want to delete the m_modulType the m_powerDomain and m_father (because they are likely to be referred to by another object), do I have to explicitely write a destructor method ?
I know that string is a standard object and will be destroy by its own destructor, but will the ConnexionHashMap be destroyed by the standard hashmap template destructor or should i delete it manually somehow ?
(also on a sidenote is there an easy way to see how my memory is managed while my program is running on Eclipse cdt ? )
x, for examplex myptrorx/64xb(show 64 bytes as hexadecimals.) For reference sourceware.org/gdb/current/onlinedocs/gdb/… - Skurmedel