on android when i move to another activity and i finish activity with
private WebSocketClient mWebSocketClient;
I see in logcat going mad message every 10 ms
GC_FOR_ALLOC freed 512K, 4% free 17338K/17896K, paused 13ms, total 13ms
how to propertly close websocket client and alla associated resources ?
I do
mWebSocketClient.close();
but apparently it is not sufficient
when I set up the client I also use code
SSLContext sslContext = null;
try {
sslContext = SSLContext.getInstance("TLS");
sslContext.init(null, null, null); // will use java's default key and trust store which is sufficient unless you deal with self-signed certificates
} catch (NoSuchAlgorithmException e) {
e.printStackTrace();
} catch (KeyManagementException e) {
e.printStackTrace();
}
//
mWebSocketClient.setWebSocketFactory(new DefaultSSLWebSocketClientFactory(sslContext));
maybe that has to do with it,
also when I tried to investigate what's allocated I found it was about
AllocatedClass javax.net.ssl.SSLEngineResult
Allocated in org.apache.harmony.xnet.provider.jsse.SSLEngineImpl unwrap
any help?