Skip to content

Fix the problem that the pool static property holds the View referenc… #5511

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ public static AnimatedMoveViewJob getInstance(ViewPortHandler viewPortHandler, f
}

public static void recycleInstance(AnimatedMoveViewJob instance){
instance.recycle();
pool.recycle(instance);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public static MoveViewJob getInstance(ViewPortHandler viewPortHandler, float xVa
}

public static void recycleInstance(MoveViewJob instance){
instance.recycle();
pool.recycle(instance);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,10 @@ public float getXValue() {
public float getYValue() {
return yValue;
}

public void recycle() {
mViewPortHandler = null;
mTrans = null;
view = null;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ public static ZoomJob getInstance(ViewPortHandler viewPortHandler, float scaleX,
}

public static void recycleInstance(ZoomJob instance) {
instance.recycle();
pool.recycle(instance);
}

Expand Down