BluetoothSPPLibrary
BluetoothSPPLibrary copied to clipboard
Suspecting Memory Leak
I used this lib in my project for long time data transmitting. After the app keeps running 30 minutes, sometimes it will ANR and FC. So, if anybody got the same problem as mine, comment here please. I'm suspecting this lib has some memory leak, hoping to get some help.
Hi! I have been using the lib for quite some time, but only on small/short connections. The bugs that I found so far are make it fail quickly, but did not get that far as to detect memory leaks... but,
Are you using one single instance of the library, or are you creating a new "Service" every now and then? The lib does not work very well if you do that last one.
Thanks for your sharing! I read its code last night, and I decided to create a singleton instance in my application. I also found that the "Service" did not need to be set up when you are discovering devices.
This is exactly what I did