Browse Source

Text: don't leak AbstractLayouter subclasses.

They are passed in a std::unique_ptr<AbstractLayouter> and with the
non-virtual destructor their destructors weren't called. Found by
AddressSanitizer.
pull/162/merge
Vladimír Vondruš 10 years ago
parent
commit
ed0e4adeda
  1. 2
      src/Magnum/Text/AbstractFont.h

2
src/Magnum/Text/AbstractFont.h

@ -362,7 +362,7 @@ class MAGNUM_TEXT_EXPORT AbstractLayouter {
/** @brief Moving is not allowed */ /** @brief Moving is not allowed */
AbstractLayouter(AbstractLayouter&&) = delete; AbstractLayouter(AbstractLayouter&&) = delete;
~AbstractLayouter(); virtual ~AbstractLayouter();
/** @brief Copying is not allowed */ /** @brief Copying is not allowed */
AbstractLayouter& operator=(const AbstractLayouter&) = delete; AbstractLayouter& operator=(const AbstractLayouter&) = delete;

Loading…
Cancel
Save