fix: clear method lookup maps (#198)

This commit is contained in:
LisoUseInAIKyrios 2023-07-01 04:35:49 +04:00 committed by GitHub
parent 7cb4d4c596
commit 9d81baf4b4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 0 deletions

View file

@ -389,6 +389,8 @@ class Patcher(private val options: PatcherOptions) {
if (stopOnError) return@sequence if (stopOnError) return@sequence
} }
} }
MethodFingerprint.clearFingerprintResolutionLookupMaps()
} }
} }

View file

@ -138,6 +138,15 @@ abstract class MethodFingerprint(
} }
} }
/**
* Clears the internal lookup maps created in [initializeFingerprintResolutionLookupMaps]
*/
internal fun clearFingerprintResolutionLookupMaps() {
methods.clear()
methodSignatureLookupMap.clear()
methodStringsLookupMap.clear()
}
/** /**
* Resolve a list of [MethodFingerprint] using the lookup map built by [initializeFingerprintResolutionLookupMaps]. * Resolve a list of [MethodFingerprint] using the lookup map built by [initializeFingerprintResolutionLookupMaps].
* *