Permalink
Browse files

Generator needs virtual destructor to avoid memory leaks

  • Loading branch information...
1 parent d5e820a commit 66ea10555faf4b9f4722b53ef6ddfee03066cc75 @Kronuz Kronuz committed Dec 2, 2016
Showing with 2 additions and 0 deletions.
  1. +2 −0 c++/namegen.h
View
@@ -191,6 +191,8 @@ class Generator
Generator(const std::string& pattern, bool collapse_triples=true);
Generator(std::vector<std::unique_ptr<Generator>>&& generators_);
+ virtual ~Generator() = default;
+
virtual size_t combinations();
virtual size_t min();
virtual size_t max();

0 comments on commit 66ea105

Please sign in to comment.