Merge pull request #9640 from umbraco/v8/bugfix/memory-leak-9348

Fixes a memory leak caused by deep cloning

(cherry picked from commit 824349ae0d)
This commit is contained in:
Bjarke Berg
2021-01-12 11:46:29 +01:00
committed by Sebastiaan Janssen
parent 667dec454a
commit 0f2db02289
15 changed files with 130 additions and 25 deletions

View File

@@ -168,6 +168,8 @@ namespace Umbraco.Core.Models
/// </summary>
public event NotifyCollectionChangedEventHandler CollectionChanged;
public void ClearCollectionChangedEvents() => CollectionChanged = null;
protected virtual void OnCollectionChanged(NotifyCollectionChangedEventArgs args)
{
CollectionChanged?.Invoke(this, args);