No need to allocate on disposal (#1257)
This commit is contained in:
Родитель
354d85d129
Коммит
6a2d2ed80c
|
@ -65,13 +65,13 @@ namespace SkiaSharp
|
|||
|
||||
protected override void DisposeManaged ()
|
||||
{
|
||||
if (ownedObjects is ConcurrentDictionary<IntPtr, SKObject> dic) {
|
||||
foreach (var child in dic) {
|
||||
child.Value.DisposeInternal ();
|
||||
if (ownedObjects != null) {
|
||||
foreach (var child in ownedObjects) {
|
||||
child.Value?.DisposeInternal ();
|
||||
}
|
||||
dic.Clear ();
|
||||
ownedObjects.Clear ();
|
||||
}
|
||||
KeepAliveObjects?.Clear ();
|
||||
keepAliveObjects?.Clear ();
|
||||
}
|
||||
|
||||
protected override void DisposeNative ()
|
||||
|
|
Загрузка…
Ссылка в новой задаче