Hi all,
I have a class that looks like:
typedef map<Node*,Node*> NodeMap;
class Component
{
NodeMap inputMap;
NodeMap outputMap;
Node* node;
public:
Component();
~Component()
};
In the destructor I delete node and the rest is done by the compiler. The
funny part is that ~Component() fails with the following stack :
------------------------------------------------------------------------
std::_Tree<std::_Tmap_traits<Node *,Node *,std::less<Node
*>,std::allocator<std::pair<Node * const,Node *> >,0> >::begin() C++
------------------------------------------------------------------------
std::_Tree<std::_Tmap_traits<Node *,Node *,std::less<Node
*>,std::allocator<std::pair<Node * const,Node *> >,0> >::_Tidy() C++
------------------------------------------------------------------------
std::_Tree<std::_Tmap_traits<Node *,Node *,std::less<Node
*>,std::allocator<std::pair<Node * const,Node *> >,0>
>::~_Tree<std::_Tmap_traits<Node *,Node *,std::less<Node
*>,std::allocator<std::pair<Node * const,Node *> >,0> >() C++
------------------------------------------------------------------------
std::map<Node *,Node *,std::less<Node *>,std::allocator<std::pair<Node *
const,Node *> > >::~map<Node *,Node *,std::less<Node
*>,std::allocator<std::pair<Node * const,Node *> > >() C++
------------------------------------------------------------------------
Component::~Component() C++
------------------------------------------------------------------------
and I don't really understand why. All that I do with inputMap and outputMap
are some inserts. However if I switch to STLport I don't see the problem.
Any ideas? I'm thinking memory corruption but not sure....
Nick