I am having a problem with std::list.
std::list<Component*> mComponents;
//add some pointer in it
Component * comp = getComponent("positionComponent");
mComponents.remove(comp);
For some reason, it calls the destructor of the comp pointer but doesn't delete it; items that are removed through destructor gets removed, while all the other items in the list kept intact. What can cause this behavior?