Skip to content

Unregister Glide in onDestroyView #1337

Open
@frel

Description

@frel

Glide Version:
3.7.0

Integration libraries:
Default.

Device/Android Version:
Nexus 5, 6.0.1

Issue details / Repro steps / Use case background:

Hi,

I use Glide with fragments - Glide.with(fragment) - and I have an issue when navigating in the app. The fragments are added to the back stack and onDestroyView() is called. But onDestroy() is not called.

Before using Glide this was not a problem as we set the view references to null in onDestroyView(). But with Glide the views are still retained and I believe it is because Glide releases in onDestroy(). But the fragments are not destroyed when added to the back stack, thus resulting in a memory build up.

  • Is there a way to unregister explicitly like what is done in onDestroy() in the library?
  • Is there another way I can approach this?

Calling Glide.clear() on all the views is not an option as it would add way too much code.

Thank you very much

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions