From ed0e4adeda39d033f065c3afeb845b1df7bed294 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Vladim=C3=ADr=20Vondru=C5=A1?= Date: Thu, 4 Aug 2016 21:37:43 +0200 Subject: [PATCH] Text: don't leak AbstractLayouter subclasses. They are passed in a std::unique_ptr and with the non-virtual destructor their destructors weren't called. Found by AddressSanitizer. --- src/Magnum/Text/AbstractFont.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Magnum/Text/AbstractFont.h b/src/Magnum/Text/AbstractFont.h index 3af3f3ddc..c8a90eb5c 100644 --- a/src/Magnum/Text/AbstractFont.h +++ b/src/Magnum/Text/AbstractFont.h @@ -362,7 +362,7 @@ class MAGNUM_TEXT_EXPORT AbstractLayouter { /** @brief Moving is not allowed */ AbstractLayouter(AbstractLayouter&&) = delete; - ~AbstractLayouter(); + virtual ~AbstractLayouter(); /** @brief Copying is not allowed */ AbstractLayouter& operator=(const AbstractLayouter&) = delete;