mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Weiß ich nicht, ist Monate her...
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using DirectX.Common;
|
||||
using GlitchyEngine.Core;
|
||||
using System.Collections;
|
||||
|
||||
namespace GlitchyEngine
|
||||
{
|
||||
@@ -20,7 +21,7 @@ namespace GlitchyEngine
|
||||
value?.ReleaseRef();
|
||||
value = null;
|
||||
}
|
||||
|
||||
|
||||
public static mixin DeleteContainerAndReleaseItems(var container)
|
||||
{
|
||||
if (container != null)
|
||||
@@ -37,5 +38,17 @@ namespace GlitchyEngine
|
||||
value?.ReleaseRef();
|
||||
container.Clear();
|
||||
}
|
||||
|
||||
public static mixin DeleteDictionaryAndReleaseValues(var container)
|
||||
{
|
||||
if (container != null)
|
||||
{
|
||||
for (var value in container)
|
||||
{
|
||||
value.value?.ReleaseRef();
|
||||
}
|
||||
delete container;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user