From 90d4746c772407dd185caee17a58c934941964b5 Mon Sep 17 00:00:00 2001 From: JIA-ss <627723154@qq.com> Date: Wed, 21 Jul 2021 22:00:39 +0800 Subject: [PATCH] Under unity, the dll will not be completely uninstalled, so the stack and the heap content of the thread needs to be regenerated --- client/TracyProfiler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/TracyProfiler.cpp b/client/TracyProfiler.cpp index 3096817f..8e612a06 100644 --- a/client/TracyProfiler.cpp +++ b/client/TracyProfiler.cpp @@ -963,7 +963,7 @@ ProfilerData* s_profilerData = nullptr; static ProfilerThreadData& GetProfilerThreadData(); TRACY_API void StartupProfiler() { - s_profilerData = (ProfilerData*)tracy_malloc( sizeof( ProfilerData ) ); + s_profilerData = (ProfilerData*)tracy_malloc(sizeof(ProfilerData)); new (s_profilerData) ProfilerData(); s_profilerData->profiler.SpawnWorkerThreads(); GetProfilerThreadData().token = ProducerWrapper(*s_profilerData); @@ -976,7 +976,7 @@ static ProfilerData& GetProfilerData() TRACY_API void ShutdownProfiler() { s_profilerData->~ProfilerData(); - tracy_free( s_profilerData ); + tracy_free(s_profilerData); s_profilerData = nullptr; rpmalloc_finalize(); RpThreadInitDone = false;