OnDetached

annotation class OnDetached

A method annotated with this annotation is called when the component is detached from the ComponentTree.

In a component spec, you can acquire resources in @OnAttached method, and release them in @OnDetached method.

For example: @OnDetached void onDetached( ComponentContext c, @Prop final DataSource dataSource, @State final SourceListener sourceListener) { dataSource.unsubscribe(sourceListener); }

Functions

Link copied to clipboard
abstract fun annotationType(): Class<out Annotation>
Link copied to clipboard
abstract fun equals(p: Any): Boolean
Link copied to clipboard
abstract fun hashCode(): Int
Link copied to clipboard
abstract fun toString(): String