Azure / azure-storage-android

Microsoft Azure Storage Library for Android
Apache License 2.0
81 stars 48 forks source link

Resource leaking when create table #35

Closed SaeedMasoumi closed 7 years ago

SaeedMasoumi commented 7 years ago

I've got the following strict mode warning when I call myTable.createIfNotExists()

E/StrictMode: A resource was acquired at attached stack trace but never released. See java.io.Closeable for information on avoiding resource leaks.
                                                                          java.lang.Throwable: Explicit termination method 'close' not called
                                                                              at dalvik.system.CloseGuard.open(CloseGuard.java:180)
                                                                              at com.android.org.conscrypt.OpenSSLSocketImpl.startHandshake(OpenSSLSocketImpl.java:288)
                                                                              at com.android.okhttp.internal.http.SocketConnector.connectTls(SocketConnector.java:103)
                                                                              at com.android.okhttp.Connection.connect(Connection.java:143)
                                                                              at com.android.okhttp.Connection.connectAndSetOwner(Connection.java:185)
                                                                              at com.android.okhttp.OkHttpClient$1.connectAndSetOwner(OkHttpClient.java:128)
                                                                              at com.android.okhttp.internal.http.HttpEngine.nextConnection(HttpEngine.java:341)
                                                                              at com.android.okhttp.internal.http.HttpEngine.connect(HttpEngine.java:330)
                                                                              at com.android.okhttp.internal.http.HttpEngine.sendRequest(HttpEngine.java:248)
                                                                              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.execute(HttpURLConnectionImpl.java:453)
                                                                              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponse(HttpURLConnectionImpl.java:404)
                                                                              at com.android.okhttp.internal.huc.HttpURLConnectionImpl.getResponseCode(HttpURLConnectionImpl.java:536)
                                                                              at com.android.okhttp.internal.huc.DelegatingHttpsURLConnection.getResponseCode(DelegatingHttpsURLConnection.java:105)
                                                                              at com.android.okhttp.internal.huc.HttpsURLConnectionImpl.getResponseCode(HttpsURLConnectionImpl.java:25)
                                                                              at com.microsoft.azure.storage.core.ExecutionEngine.executeWithRetry(ExecutionEngine.java:119)
                                                                              at com.microsoft.azure.storage.table.QueryTableOperation.performRetrieve(QueryTableOperation.java:176)
                                                                              at com.microsoft.azure.storage.table.TableOperation.execute(TableOperation.java:696)
                                                                              at com.microsoft.azure.storage.table.CloudTable.exists(CloudTable.java:882)
                                                                              at com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:287)
                                                                              at com.microsoft.azure.storage.table.CloudTable.createIfNotExists(CloudTable.java:262)
erezvani1529 commented 7 years ago

Hi @SaeedMasoumi,

Thanks for bringing this to our attention. We will look into it and update.

Thanks!

jofri-msft commented 7 years ago

@SaeedMasoumi, this warning should be fixed in the next release