use of org.androidannotations.holder.HasLifecycleMethods in project androidannotations by androidannotations.
the class OrmLiteHolder method injectReleaseInOnDestroy.
private void injectReleaseInOnDestroy(JFieldVar databaseHelperRef) {
if (holder() instanceof HasLifecycleMethods) {
JBlock destroyBody = ((HasLifecycleMethods) holder()).getOnDestroyBeforeSuperBlock();
destroyBody.staticInvoke(getJClass(OrmLiteClasses.OPEN_HELPER_MANAGER), "releaseHelper");
destroyBody.assign(databaseHelperRef, _null());
}
}
Aggregations