Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PlaceBuffer must be released after use. #20

Open
gshadows opened this issue May 28, 2018 · 5 comments
Open

PlaceBuffer must be released after use. #20

gshadows opened this issue May 28, 2018 · 5 comments

Comments

@gshadows
Copy link

Google documentation says "NOTE: The calling application must release() this object after it is done with it to prevent a memory leak".

Without this I get this errors in log:

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. (internal object: com.google.android.gms.common.data.DataHolder@5ed0442)

To fix this I added if (mPlaces != null) mPlaces.release(); call at the beginning of PlaceListAdapter.swapPlaces().

@osaaroh
Copy link

osaaroh commented Aug 10, 2018

@gshadows I saw that in the documentation too. I've not added it yet (currently on the fourth exercise) and I don't have any error for now

@moharidy
Copy link

moharidy commented Oct 9, 2018

you mean in inside the method swapPlaces() which is inside the PlaceListAdapter.?

@gshadows
Copy link
Author

@moharidy yeah, you're right.

@moharidy
Copy link

thanks a lot and sorry for late thanks:-)

@moharidy
Copy link

i just applied this solution but the recyclerView shows nothing on the Mainactivtiy screen. the location i in DB but it is not shown on the screen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants