From df47a7be9078802c694231e6e8fa6336601bd4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Konstantin=20Ka=CC=88fer?= Date: Tue, 12 Aug 2014 13:35:04 +0200 Subject: [PATCH] explicitly define destructor to avoid destructing with forward declaration --- include/mbgl/style/style.hpp | 1 + src/style/style.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/include/mbgl/style/style.hpp b/include/mbgl/style/style.hpp index 1f24674e4..6acb5d0cb 100644 --- a/include/mbgl/style/style.hpp +++ b/include/mbgl/style/style.hpp @@ -28,6 +28,7 @@ public: public: Style(); + ~Style(); void loadJSON(const uint8_t *const data); diff --git a/src/style/style.cpp b/src/style/style.cpp index 22c761010..ee930751e 100644 --- a/src/style/style.cpp +++ b/src/style/style.cpp @@ -19,6 +19,11 @@ Style::Style() : mtx(std::make_unique()) { } +// Note: This constructor is seemingly empty, but we need to declare it anyway +// because this file includes uv_detail.hpp, which has the declarations necessary +// for deleting the std::unique_ptr. +Style::~Style() {} + void Style::updateProperties(float z, timestamp now) { uv::writelock lock(mtx);