mirror of
https://github.com/xivdev/Penumbra.git
synced 2025-12-15 13:14:17 +01:00
Dispose collection caches on plugin disposal.
This commit is contained in:
parent
19166d8cf4
commit
d0c4d6984c
1 changed files with 6 additions and 0 deletions
|
|
@ -84,6 +84,12 @@ public class CollectionCacheManager : IDisposable, IService
|
||||||
_communicator.ModSettingChanged.Unsubscribe(OnModSettingChange);
|
_communicator.ModSettingChanged.Unsubscribe(OnModSettingChange);
|
||||||
_communicator.CollectionInheritanceChanged.Unsubscribe(OnCollectionInheritanceChange);
|
_communicator.CollectionInheritanceChanged.Unsubscribe(OnCollectionInheritanceChange);
|
||||||
MetaFileManager.CharacterUtility.LoadingFinished -= IncrementCounters;
|
MetaFileManager.CharacterUtility.LoadingFinished -= IncrementCounters;
|
||||||
|
|
||||||
|
foreach (var collection in _storage)
|
||||||
|
{
|
||||||
|
collection._cache?.Dispose();
|
||||||
|
collection._cache = null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddChange(CollectionCache.ChangeData data)
|
public void AddChange(CollectionCache.ChangeData data)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue