From 26c530a45654cbfd917f376859fa93c2a2f0719d Mon Sep 17 00:00:00 2001 From: JIA-ss <627723154@qq.com> Date: Wed, 21 Jul 2021 22:06:31 +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 8e612a06..35c34af4 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;