mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-18 09:34:34 +07:00
IDEA-COMMUNITY-CR-2175 (explicit archive handler cleanup)
This commit is contained in:
@@ -92,6 +92,10 @@ public abstract class ArchiveHandler {
|
||||
return ArrayUtil.toStringArray(names);
|
||||
}
|
||||
|
||||
public void dispose() {
|
||||
myEntries.clear();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
protected EntryInfo getEntryInfo(@NotNull String relativePath) {
|
||||
return getEntriesMap().get(relativePath);
|
||||
|
||||
@@ -119,7 +119,9 @@ public class ZipHandler extends ArchiveHandler {
|
||||
return getFile();
|
||||
}
|
||||
|
||||
public void dispose() { // todo it would be nice to dispose ZipHandler
|
||||
@Override
|
||||
public void dispose() {
|
||||
super.dispose();
|
||||
ourZipFileFileAccessorCache.remove(this);
|
||||
}
|
||||
|
||||
|
||||
@@ -302,6 +302,7 @@ public class VfsImplUtil {
|
||||
static InvalidationState invalidate(@Nullable InvalidationState state, final String path) {
|
||||
Pair<ArchiveFileSystem, ArchiveHandler> handlerPair = ourHandlers.remove(path);
|
||||
if (handlerPair != null) {
|
||||
handlerPair.second.dispose();
|
||||
forEachDirectoryComponent(path, new Consumer<String>() {
|
||||
@Override
|
||||
public void consume(String containingDirectoryPath) {
|
||||
|
||||
Reference in New Issue
Block a user