diff --git a/src/Shared/PlatformSupport/StandardRuntimePlatform.cs b/src/Shared/PlatformSupport/StandardRuntimePlatform.cs index d648b630bd..fafa17a810 100644 --- a/src/Shared/PlatformSupport/StandardRuntimePlatform.cs +++ b/src/Shared/PlatformSupport/StandardRuntimePlatform.cs @@ -69,7 +69,9 @@ namespace Avalonia.Shared.PlatformSupport { if (!IsDisposed) { +#if DEBUG Backtraces.Remove(_backtrace); +#endif _plat.Free(Address, Size); GC.RemoveMemoryPressure(Size); IsDisposed = true;