summaryrefslogtreecommitdiff
path: root/src/mbgl/util
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2019-08-16 12:03:53 +0200
committerAlexander Shalamov <alexander.shalamov@mapbox.com>2020-02-14 17:34:00 +0200
commita876c965a55213f38b91303c81239fbda0a9f7da (patch)
tree3189f7cd15c0633a54b8220550ab3e8b28e50a75 /src/mbgl/util
parent189ed4aac362f7122e0889cdb9c7fc6580d24392 (diff)
downloadqtlocation-mapboxgl-a876c965a55213f38b91303c81239fbda0a9f7da.tar.gz
[core] Store SegmentVectors in ephemeral render objects
We used some shared SegmentVectors, e.g. for drawing raster or background tiles. In longer running maps, this lead to resource accumulation. By storing the SegmentVectors and the contained gfx::DrawScope objects, we ensure that resources get released when the associated render objects vanish.
Diffstat (limited to 'src/mbgl/util')
-rw-r--r--src/mbgl/util/id.cpp14
-rw-r--r--src/mbgl/util/id.hpp11
2 files changed, 0 insertions, 25 deletions
diff --git a/src/mbgl/util/id.cpp b/src/mbgl/util/id.cpp
deleted file mode 100644
index 4486194de4..0000000000
--- a/src/mbgl/util/id.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-#include <mbgl/util/id.hpp>
-
-#include <atomic>
-
-namespace mbgl {
-namespace util {
-
-uint64_t nextID() {
- static std::atomic<uint64_t> GUID { 0 };
- return GUID++;
-}
-
-} // namespace util
-} // namespace mbgl
diff --git a/src/mbgl/util/id.hpp b/src/mbgl/util/id.hpp
deleted file mode 100644
index 12e23dfc2d..0000000000
--- a/src/mbgl/util/id.hpp
+++ /dev/null
@@ -1,11 +0,0 @@
-#pragma once
-
-#include <cstdint>
-
-namespace mbgl {
-namespace util {
-
-uint64_t nextID();
-
-} // namespace util
-} // namespace mbgl