From e763f046899ce09bf8a586ea75a7d9a9d27e70e4 Mon Sep 17 00:00:00 2001 From: Jason Rhinelander Date: Fri, 18 May 2018 12:48:32 -0300 Subject: [PATCH] Base class destructor should be virtual Fixes #1401 --- tests/test_virtual_functions.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_virtual_functions.cpp b/tests/test_virtual_functions.cpp index a69ba153e..6ffdf33af 100644 --- a/tests/test_virtual_functions.cpp +++ b/tests/test_virtual_functions.cpp @@ -17,7 +17,7 @@ public: ExampleVirt(int state) : state(state) { print_created(this, state); } ExampleVirt(const ExampleVirt &e) : state(e.state) { print_copy_created(this); } ExampleVirt(ExampleVirt &&e) : state(e.state) { print_move_created(this); e.state = 0; } - ~ExampleVirt() { print_destroyed(this); } + virtual ~ExampleVirt() { print_destroyed(this); } virtual int run(int value) { py::print("Original implementation of "