Skip to content

Commit

Permalink
fix(android): add ControllerRegistry destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
siguangli2018 authored and siguangli committed Aug 12, 2024
1 parent a8f4bdf commit 482e258
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -178,8 +178,8 @@ public HippyCustomPropsController getCustomPropsController() {
}

public void destroy() {
mControllerRegistry.clear();
mControllerUpdateManger.clear();
mControllerRegistry.destroy();
mControllerUpdateManger.destroy();
for (Pool<Integer, View> pool : mPreCreateViewPools.values()) {
pool.clear();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ public ControllerRegistry(@NonNull Renderer renderer) {
mRendererWeakRef = new WeakReference<>(renderer);
}

public void clear() {}
void destroy() {
mViews.clear();
mRootViews.clear();
mControllers.clear();
}

public void addControllerHolder(String name, ControllerHolder controllerHolder) {
mControllers.put(name, controllerHolder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public ControllerUpdateManger(@NonNull Renderer renderer) {
mRendererWeakRef = new WeakReference<>(renderer);
}

public void clear() {
void destroy() {

}

Expand Down

0 comments on commit 482e258

Please sign in to comment.