From 7b462801d500b43bd7ebebe69c2e8a9d5e3f1261 Mon Sep 17 00:00:00 2001 From: Dan Goodliffe Date: Thu, 25 Jan 2024 23:49:27 +0000 Subject: Remove the static texture cache Static variables persist too long, destruction is unmanaged and occurs after the gl context is gone. --- game/network/network.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'game/network') diff --git a/game/network/network.cpp b/game/network/network.cpp index 8aa9adb..500742c 100644 --- a/game/network/network.cpp +++ b/game/network/network.cpp @@ -2,7 +2,6 @@ #include "routeWalker.h" #include #include -#include #include #include #include @@ -10,7 +9,7 @@ #include #include -Network::Network(const std::string & tn) : texture {Texture::cachedTexture.get(tn)} { } +Network::Network(const std::string & tn) : texture {std::make_shared(tn)} { } Node::Ptr Network::nodeAt(GlobalPosition3D pos) -- cgit v1.2.3