I am using AppState to store my current Android application data. When I call the
load
method and set a callback listener i see the following in my logcat output.
Internal data leak within a DataBuffer object detected! Be sure to explicitly call close() on all DataBuffer extending objects when you are done with them. (com.google.android.gms.appstate.AppStateBuffer@45454128)
This is my method call (I am not explicitly opening any buffers)
AppStateManager
.load(getApiClient(), APP_STATE_STATE_KEY)
.setResultCallback(new ResultCallback<AppStateManager.StateResult>() {
@Override
public void onResult(final StateResult stateResult) {
}
});
e.g. The onResult()
method is empty, so why do i see this logcat entry?
What buffer do i need close?
It's not a buffer what you need to close, but the connection instead. Even though your onResult method is empty it is the result of a callback, which means a connection was established.
I saw the same logcat output with Google Maps Api when I ommited
GoogleApiClient.disconnect()
at the end of the activity/fragment lifecycle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With