1 changed files with 0 additions and 29 deletions
@ -1,29 +0,0 @@ |
|||||
// Copyright (c) The Avalonia Project. All rights reserved.
|
|
||||
// Licensed under the MIT license. See licence.md file in the project root for full license information.
|
|
||||
|
|
||||
using System; |
|
||||
|
|
||||
namespace Avalonia.Utilities |
|
||||
{ |
|
||||
public class GCNotifier |
|
||||
{ |
|
||||
public static event EventHandler GarbageCollected; |
|
||||
|
|
||||
static GCNotifier() |
|
||||
{ |
|
||||
new GCNotifier(); |
|
||||
} |
|
||||
|
|
||||
~GCNotifier() |
|
||||
{ |
|
||||
if (Environment.HasShutdownStarted || AppDomain.CurrentDomain.IsFinalizingForUnload()) |
|
||||
{ |
|
||||
return; |
|
||||
} |
|
||||
|
|
||||
new GCNotifier(); |
|
||||
|
|
||||
GarbageCollected?.Invoke(null, EventArgs.Empty); |
|
||||
} |
|
||||
} |
|
||||
} |
|
||||
Loading…
Reference in new issue