When what we need is a shared_ptr, we should just go ahead and use one.

One of the top crashes reported in the Play Console is a ManagedTexture crash, so seeing if this might help.
This commit is contained in:
Henrik Rydgård committed 2017-05-18 13:28:56 +02:00
1 parent 60378a0dcb
commit df6ce90c84
16 files changed
+73 -81

No files matched your search

+2 -3
View File
@@ -120,7 +120,7 @@ static UI::Theme ui_theme;
#include "android/android-ndk-profiler/prof.h"
#endif
ManagedTexture *uiTexture;
std::unique_ptr<ManagedTexture> uiTexture;
ScreenManager *screenManager;
std::string config_filename;
@@ -681,8 +681,7 @@ void NativeShutdownGraphics() {
UIBackgroundShutdown();
delete uiTexture;
uiTexture = nullptr;
uiTexture.reset(nullptr);
delete uiContext;
uiContext = nullptr;