Skip to content

Commit

Permalink
Attempt at fixing memory leak.
Browse files Browse the repository at this point in the history
  • Loading branch information
bigorangemachine committed Jul 1, 2015
1 parent 7148225 commit f74b84d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Binary file modified GameData.zip
Binary file not shown.
4 changes: 4 additions & 0 deletions src/KRSVesselShot.cs
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,10 @@ public void GenTexture(Vector3 direction, int imageWidth = -1, int imageHeight =
RestorePartShaders(p);
}
}
if (uiBoolVals["saveTextureEvent"])
{
Resources.UnloadUnusedAssets();//fix memory leak?
}
}

private void SaveTexture(String fileName)
Expand Down
2 changes: 2 additions & 0 deletions src/KRSVesselShotUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,8 @@ void OnDestroy()

if (KVVButton != null)
ApplicationLauncher.Instance.RemoveModApplication(KVVButton);

Resources.UnloadUnusedAssets();//fix memory leak?
}
}
}

0 comments on commit f74b84d

Please sign in to comment.