eclipse / paho.mqtt.android

MQTT Android
Other
2.92k stars 883 forks source link

MqttAndroidClient is memory leaked?? #455

Open t1k4sh2 opened 3 years ago

t1k4sh2 commented 3 years ago

Please fill out the form below before submitting, thank you!

Android API Version Bug Seen on: target sdk 27, min sdk 27

Android Version Bug Seen on: Android 8.1

Please also check that if you have found the bug in the Release version (1.1.1) that you check that it also exists in the Snapshot (1.1.2-SNAPSHOT) before raising a bug.

Description of Bug:

E.g. Steps to re-create, how often does this happen etc..

The size of the variable increases when sending 150 to 200 times per second.

MQTT publish 150 to 200 times per second continuously for several hours.

class "MqttAndroidClient", member variables "tokenMap" 's size gets bigger and bigger. It will be about 2,000 in 15 hours.

SparseArray's key is 970, 1837, 2206,2597, 8844, 9790, 11460, 12319, 12324, 12325........

Console Log output (if available):

none

KindenKuo commented 2 years ago

I also experience this issue when set QoS to 0. But the issue is not there when QoS is 1.