public static void CleanUpMemory() { AniDB_Anime.GetAll().ForEach(a => a.CollectContractMemory()); VideoLocal.GetAll().ForEach(a => a.CollectContractMemory()); AnimeEpisode.GetAll().ForEach(a => a.CollectContractMemory()); AnimeEpisode_User.GetAll().ForEach(a => a.CollectContractMemory()); AnimeSeries.GetAll().ForEach(a => a.CollectContractMemory()); AnimeSeries_User.GetAll().ForEach(a => a.CollectContractMemory()); AnimeGroup.GetAll().ForEach(a => a.CollectContractMemory()); AnimeGroup_User.GetAll().ForEach(a => a.CollectContractMemory()); GC.Collect(); }
public static void CleanUpMemory() { AniDB_Anime.GetAll().ForEach(a => a.CollectContractMemory()); VideoLocal.GetAll().ForEach(a => a.CollectContractMemory()); AnimeEpisode_User.GetAll().ForEach(a => a.CollectContractMemory()); AnimeSeries.GetAll().ForEach(a => a.CollectContractMemory()); AnimeSeries_User.GetAll().ForEach(a => a.CollectContractMemory()); AnimeGroup.GetAll().ForEach(a => a.CollectContractMemory()); AnimeGroup_User.GetAll().ForEach(a => a.CollectContractMemory()); GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce; GC.Collect(); }