diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2019-08-16 12:03:53 +0200 |
---|---|---|
committer | Alexander Shalamov <alexander.shalamov@mapbox.com> | 2020-02-14 17:34:00 +0200 |
commit | a876c965a55213f38b91303c81239fbda0a9f7da (patch) | |
tree | 3189f7cd15c0633a54b8220550ab3e8b28e50a75 /src/mbgl/util | |
parent | 189ed4aac362f7122e0889cdb9c7fc6580d24392 (diff) | |
download | qtlocation-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.cpp | 14 | ||||
-rw-r--r-- | src/mbgl/util/id.hpp | 11 |
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 |