d0f1b81bfa
#KT-14780 Fixed #KT-14677 Fixed (cherry picked from commit f591b4958e4a836d37d70c2ad8ff15e626c6342a)
24 lines
773 B
Kotlin
Vendored
24 lines
773 B
Kotlin
Vendored
// INSPECTION_CLASS: org.jetbrains.android.inspections.klint.AndroidLintInspectionToolProvider$AndroidKLintRecycleInspection
|
|
|
|
@file:Suppress("UNUSED_VARIABLE")
|
|
|
|
import android.app.Activity
|
|
import android.os.Bundle
|
|
import android.view.VelocityTracker
|
|
|
|
class MainActivity : Activity() {
|
|
|
|
override fun onCreate(savedInstanceState: Bundle?) {
|
|
super.onCreate(savedInstanceState)
|
|
|
|
VelocityTracker.<warning descr="This `VelocityTracker` should be recycled after use with `#recycle()`">obtain</warning>()
|
|
|
|
VelocityTracker.obtain().recycle()
|
|
|
|
val v1 = VelocityTracker.<warning descr="This `VelocityTracker` should be recycled after use with `#recycle()`">obtain</warning>()
|
|
|
|
val v2 = VelocityTracker.obtain()
|
|
v2.recycle()
|
|
}
|
|
}
|