Add virtual destructor

Summary:
Not having a virtual destructor caused tests
to fail (cypher_main_visitor, interpreter) sporadically
since unfreed memory was re-used incorrectly.
Also Valgrind complained constantly.

Reviewers: florijan, teon.banek

Reviewed By: teon.banek

Subscribers: pullbot

Differential Revision: https://phabricator.memgraph.io/D1081
This commit is contained in:
Dominik Gleich 2017-12-22 13:34:13 +01:00
parent 1ee6d6d05e
commit b094e7473b
2 changed files with 2 additions and 3 deletions

View File

@ -17,5 +17,6 @@ class ConcurrentIdMapper {
public:
virtual TId value_to_id(const std::string &value) = 0;
virtual const std::string &id_to_value(const TId &id) = 0;
virtual ~ConcurrentIdMapper() {}
};
} // namespace storage

View File

@ -11,9 +11,7 @@ namespace storage {
/** Master implementation of ConcurrentIdMapper. */
template <typename TId>
class MasterConcurrentIdMapper
: public SingleNodeConcurrentIdMapper<TId> {
class MasterConcurrentIdMapper : public SingleNodeConcurrentIdMapper<TId> {
public:
MasterConcurrentIdMapper(communication::messaging::System &system);
~MasterConcurrentIdMapper();