Multiuserchatmanager multiuserchats data only increases but not decreases

Each time a new MUC is added, there will be more and more after a long time

Which datastructure are we talking about?


I’m going to use smack to write a chat robot. There may be a lot of MUCs, which cannot be destroyed after the session ends, and the memory will continue to rise

The values of the map are weakly referenced (as the name of the map type suggests). Furthermore, after 50 insertions, the map will clean all entries where the weak reference does not reference an object any more. Is it possible that you hold strong references to no-longer required MultiUserChat instances in your code somewhere?

I don’t read the source code thoroughly enough. I see what you mean. Thank you for your answer

This topic was automatically closed 100 days after the last reply. New replies are no longer allowed.