summaryrefslogtreecommitdiff
path: root/include/mbgl/style/sources/raster_source.hpp
diff options
context:
space:
mode:
authorMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2019-09-10 06:55:38 +0300
committerJulian Rex <julian.rex@mapbox.com>2019-09-09 23:55:38 -0400
commit5207a360746d7d0541e21ca4e8d22b432f41d8f5 (patch)
tree6bb894331c13de8c1f253872639f17ae3c3c6aea /include/mbgl/style/sources/raster_source.hpp
parent45140af7cb7f485008905a645e043480615109bc (diff)
downloadqtlocation-mapboxgl-5207a360746d7d0541e21ca4e8d22b432f41d8f5.tar.gz
[core, ios, macos] SDK objects should hold weak pointers to the core style objects (#15539)
Diffstat (limited to 'include/mbgl/style/sources/raster_source.hpp')
-rw-r--r--include/mbgl/style/sources/raster_source.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/mbgl/style/sources/raster_source.hpp b/include/mbgl/style/sources/raster_source.hpp
index 5aa81aa979..1bdced8da7 100644
--- a/include/mbgl/style/sources/raster_source.hpp
+++ b/include/mbgl/style/sources/raster_source.hpp
@@ -25,9 +25,14 @@ public:
void loadDescription(FileSource&) final;
+ mapbox::base::WeakPtr<Source> makeWeakPtr() final {
+ return weakFactory.makeWeakPtr();
+ }
+
private:
const variant<std::string, Tileset> urlOrTileset;
std::unique_ptr<AsyncRequest> req;
+ mapbox::base::WeakPtrFactory<Source> weakFactory {this};
};
template <>