From ae6f095991d5304a09892b825d849a43bbf6d42b 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 336f5e45c..395274370 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 "