diff --git a/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/codegen/AndroidExpressionCodegenExtension.kt b/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/codegen/AndroidExpressionCodegenExtension.kt index 2670ac27ac1..084397b523d 100644 --- a/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/codegen/AndroidExpressionCodegenExtension.kt +++ b/plugins/android-compiler-plugin/src/org/jetbrains/kotlin/android/synthetic/codegen/AndroidExpressionCodegenExtension.kt @@ -91,7 +91,7 @@ public class AndroidExpressionCodegenExtension : ExpressionCodegenExtension { private val PROPERTY_NAME = "_\$_findViewCache" private val CACHED_FIND_VIEW_BY_ID_METHOD_NAME = "_\$_findCachedViewById" val CLEAR_CACHE_METHOD_NAME = "_\$_clearFindViewByIdCache" - val ON_DESTROY_METHOD_NAME = "onDestroy" + val ON_DESTROY_METHOD_NAME = "onDestroyView" fun isCacheSupported(descriptor: ClassifierDescriptor) = descriptor.source is KotlinSourceElement } diff --git a/plugins/android-compiler-plugin/testData/codegen/bytecodeShape/onDestroyFragment/onDestroyFragment.kt b/plugins/android-compiler-plugin/testData/codegen/bytecodeShape/onDestroyFragment/onDestroyFragment.kt index 46c1e4d45cf..d54ab4a6be9 100644 --- a/plugins/android-compiler-plugin/testData/codegen/bytecodeShape/onDestroyFragment/onDestroyFragment.kt +++ b/plugins/android-compiler-plugin/testData/codegen/bytecodeShape/onDestroyFragment/onDestroyFragment.kt @@ -18,6 +18,6 @@ public class MyFragment2 : Fragment() { } -// 2 public onDestroy\(\)V +// 2 public onDestroyView\(\)V // 1 INVOKEVIRTUAL test/MyFragment\._\$_clearFindViewByIdCache // 1 INVOKEVIRTUAL test/MyFragment2\._\$_clearFindViewByIdCache \ No newline at end of file