diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp index c8948097f..a834f5065 100644 --- a/src/mbgl/map/map_context.cpp +++ b/src/mbgl/map/map_context.cpp @@ -2,19 +2,12 @@ #include #include #include -#include #include #include #include -#include - -#include -#include -#include - #include #include @@ -34,10 +27,6 @@ MapContext::MapContext(uv_loop_t* loop, View& view_, FileSource& fileSource, Map envScope(env, ThreadType::Map, "Map"), updated(static_cast(Update::Nothing)), asyncUpdate(std::make_unique(loop, [this] { update(); })), - glyphStore(std::make_unique(loop, env)), - glyphAtlas(std::make_unique(1024, 1024)), - spriteAtlas(std::make_unique(512, 512)), - lineAtlas(std::make_unique(512, 512)), texturePool(std::make_unique()) { assert(Environment::currentlyOn(ThreadType::Map)); @@ -51,14 +40,9 @@ MapContext::~MapContext() { // Explicit resets currently necessary because these abandon resources that need to be // cleaned up by env.performCleanup(); - resourceLoader.reset(); style.reset(); painter.reset(); texturePool.reset(); - lineAtlas.reset(); - spriteAtlas.reset(); - glyphAtlas.reset(); - glyphStore.reset(); env.performCleanup(); @@ -116,21 +100,11 @@ void MapContext::setStyleJSON(const std::string& json, const std::string& base) void MapContext::loadStyleJSON(const std::string& json, const std::string& base) { assert(Environment::currentlyOn(ThreadType::Map)); - resourceLoader.reset(); style.reset(); - - style = std::make_unique