1

I had some code that queries for the children of a google drive folder:

driveResourceClient.queryChildren(parentFolder, folderQuery)
    .addOnSuccessListener { folderResult -> ... }

I was getting errors in my Logcat similar to this (during garbage collection):

E/DataBuffer﹕ Internal data leak within a DataBuffer object detected! Be sure to explicitly call release() on all DataBuffer extending objects when you are done with them.

They seemed to go away when I called:

folderResult.release()

So perhaps I fixed it (not certain), but it puzzles me that the google examples of querying do not do this.

https://developers.google.com/drive/android/queries

Does anyone know if this is, in fact, a required operation?

Thanks.

Duane
  • 86
  • 9
  • If you are using the Data Buffer the subclass under it needs to be released. See [this SO post](https://stackoverflow.com/questions/21696662/google-play-services-leak). You will also noticed one example [here](https://developer.android.com/reference/android/media/MediaCodec#data-processing). See the `codec` used data buffer so at the end it was released like in the example `codec.release`. – MαπμQμαπkγVπ.0 Sep 19 '18 at 09:07

0 Answers0