Add empty virtual destructor for lru_node_t.

history_lru_node_t has implicit destructor defined. However, because
it's being deleted as lru_node_t, it's not being actually called, as
lru_node_t doesn't have a virtual destructor.
This commit is contained in:
Konrad Borowski 2014-09-24 16:37:32 +02:00
parent bbce0909fe
commit 5766c7c53a

3
lru.h
View file

@ -36,6 +36,9 @@ public:
/** Constructor */
lru_node_t(const wcstring &pkey) : prev(NULL), next(NULL), key(pkey) { }
/** Virtual destructor that does nothing for classes that inherit lru_node_t */
virtual ~lru_node_t() {}
/** operator< for std::set */
bool operator<(const lru_node_t &other) const
{