BluetoothSPPLibrary icon indicating copy to clipboard operation
BluetoothSPPLibrary copied to clipboard

Suspecting Memory Leak

Open jinsen47 opened this issue 8 years ago • 3 comments

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.

jinsen47 avatar Mar 23 '16 16:03 jinsen47

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.

naevtamarkus avatar Mar 24 '16 08:03 naevtamarkus

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.

jinsen47 avatar Mar 24 '16 08:03 jinsen47

This is exactly what I did

naevtamarkus avatar Mar 24 '16 09:03 naevtamarkus