-1

I was trying to use built-in AlertDialog with onDismiss listener (without it result was same) and custom AppCompatDialog subclass. After dialog dismissed, current activity should finish. But few seconds later memory leak push appears. If I put breakpoint in custom dialog's onStop() method (delay is don't matter), this memory leak caption is not shown. Can it be fixed in normal way? Maybe, someone already faced with a similar problem? stack content

wingear
  • 819
  • 9
  • 21
  • attach your java class. – Nouman Ch Mar 05 '19 at 11:19
  • Already fixed this: that's was completely not related to displaying fragment: memory leak is related to displaying toasts with current activity's context. When I displayed this dialog, there are also toast was visible for previous requests. All, that I was need to fix is inject application context into MessagesManager – wingear Mar 05 '19 at 13:31

1 Answers1

0

This memory leak was related to displaying toast with current activity's context. When I injected application context into class, that displaying toasts, leak was fixed

wingear
  • 819
  • 9
  • 21