From 929affa3cb54187bffad9d54bc7f4c982c5cf318 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Fri, 14 Apr 2017 10:59:57 +0200 Subject: [PATCH] - removed MarkACSThinker. The global variable holding a pointer to this thinker should be a weak reference to the instance in the thinker chain, there is no need to mark this global variable, as the thinker's lifetime is only determined by the thinker chain. - committed a few Posix related file the last commit missed. --- src/dobjgc.cpp | 3 --- src/dobjtype.cpp | 1 - src/p_acs.cpp | 5 ----- src/posix/cocoa/i_video.mm | 2 -- src/posix/sdl/hardware.cpp | 1 - 5 files changed, 12 deletions(-) diff --git a/src/dobjgc.cpp b/src/dobjgc.cpp index c44f77b803..03a7153291 100644 --- a/src/dobjgc.cpp +++ b/src/dobjgc.cpp @@ -79,8 +79,6 @@ #include "g_levellocals.h" #include "events.h" -void MarkACSThinker(); - // MACROS ------------------------------------------------------------------ /* @@ -331,7 +329,6 @@ static void MarkRoot() Mark(DIntermissionController::CurrentIntermission); DThinker::MarkRoots(); FCanvasTextureInfo::Mark(); - MarkACSThinker(); Mark(E_FirstEventHandler); Mark(E_LastEventHandler); for (auto &s : level.sectorPortals) diff --git a/src/dobjtype.cpp b/src/dobjtype.cpp index 62a810969a..3d27b3a0dd 100644 --- a/src/dobjtype.cpp +++ b/src/dobjtype.cpp @@ -242,7 +242,6 @@ void PClass::StaticShutdown () { if (WP_NOCHANGE != nullptr) { - WP_NOCHANGE->ObjectFlags |= OF_YesReallyDelete; delete WP_NOCHANGE; } diff --git a/src/p_acs.cpp b/src/p_acs.cpp index b510ee45fe..dd75f90697 100644 --- a/src/p_acs.cpp +++ b/src/p_acs.cpp @@ -11022,11 +11022,6 @@ CCMD(acsprofile) ShowProfileData(FuncProfiles, limit, sorter, true); } -void MarkACSThinker() -{ - GC::Mark(DACSThinker::ActiveThinker); -} - ADD_STAT(ACS) { return FStringf("ACS time: %f ms", ACSTime.TimeMS()); diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 00b39639fa..34cb4bb8b0 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -632,7 +632,6 @@ DFrameBuffer* CocoaVideo::CreateFrameBuffer(const int width, const int height, c } old->GetFlash(flashColor, flashAmount); - old->ObjectFlags |= OF_YesReallyDelete; if (old == screen) { @@ -1306,7 +1305,6 @@ void I_ShutdownGraphics() { if (NULL != screen) { - screen->ObjectFlags |= OF_YesReallyDelete; delete screen; screen = NULL; } diff --git a/src/posix/sdl/hardware.cpp b/src/posix/sdl/hardware.cpp index e512adb736..580c5a1b06 100644 --- a/src/posix/sdl/hardware.cpp +++ b/src/posix/sdl/hardware.cpp @@ -95,7 +95,6 @@ void I_ShutdownGraphics () { DFrameBuffer *s = screen; screen = NULL; - s->ObjectFlags |= OF_YesReallyDelete; delete s; } if (Video)