We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 04b03c6 commit fbbc052Copy full SHA for fbbc052
libraries/sdk/src/main/java/com/fastcomments/sdk/FastCommentsFeedSDK.java
@@ -625,6 +625,25 @@ public void cleanup() {
625
liveEventSubscription.close();
626
liveEventSubscription = null;
627
}
628
+ // Clear listener references to prevent memory leaks
629
+ this.onPostDeletedListener = null;
630
+
631
+ // Clear collections to help GC
632
+ if (feedPosts != null) {
633
+ feedPosts.clear();
634
+ }
635
+ if (postsById != null) {
636
+ postsById.clear();
637
638
+ if (likeCounts != null) {
639
+ likeCounts.clear();
640
641
+ if (myReacts != null) {
642
+ myReacts.clear();
643
644
+ if (broadcastIdsSent != null) {
645
+ broadcastIdsSent.clear();
646
647
648
649
/**
0 commit comments