mirror of
https://github.com/KillzXGaming/Switch-Toolbox
synced 2024-11-22 20:43:09 +00:00
A few more adjustments for unloading arrays
This commit is contained in:
parent
46fe140f33
commit
20b248e1ea
4 changed files with 5 additions and 8 deletions
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -348,22 +348,19 @@ namespace FirstPlugin
|
|||
{
|
||||
if (ContainerArray.Count > 1)
|
||||
{
|
||||
foreach (var container in ContainerArray)
|
||||
for (int i = 0; i < ContainerArray.Count; i++)
|
||||
{
|
||||
foreach (var tex in container.Textures.Values)
|
||||
foreach (var tex in ContainerArray[i].Textures.Values)
|
||||
{
|
||||
tex.Texture.TextureData.Clear();
|
||||
tex.Texture = null;
|
||||
tex.DisposeRenderable();
|
||||
}
|
||||
|
||||
container.Textures.Clear();
|
||||
container.Nodes.Clear();
|
||||
ContainerArray[i].Textures.Clear();
|
||||
|
||||
container.BinaryTexFile = null;
|
||||
|
||||
if (PluginRuntime.bntxContainers.Contains(container))
|
||||
PluginRuntime.bntxContainers.Remove(container);
|
||||
if (PluginRuntime.bntxContainers.Contains(ContainerArray[i]))
|
||||
PluginRuntime.bntxContainers.Remove(ContainerArray[i]);
|
||||
}
|
||||
|
||||
GC.SuppressFinalize(this);
|
||||
|
|
Loading…
Reference in a new issue