Skip to content

Commit f296923

Browse files
committed
Cleanup comments tree when cleaning up SDK.
1 parent f374094 commit f296923

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

libraries/sdk/src/main/java/com/fastcomments/sdk/CommentsTree.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -991,5 +991,8 @@ public void clear() {
991991
newRootComments.clear();
992992
newRootCommentsButton = null;
993993
userPresenceCache.clear();
994+
if (adapter != null) {
995+
adapter = null;
996+
}
994997
}
995998
}

libraries/sdk/src/main/java/com/fastcomments/sdk/FastCommentsSDK.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1144,6 +1144,10 @@ public void cleanup() {
11441144
tenantIdWS = null;
11451145
urlIdWS = null;
11461146
userIdWS = null;
1147+
1148+
if (commentsTree != null) {
1149+
commentsTree.clear();
1150+
}
11471151
}
11481152

11491153
/**

0 commit comments

Comments
 (0)