Techiio-author
Started by Peter DanielsSep 28, 2021

Closed
How do I check if everything in a screen is disposed?

2 VIEWES 0 LIKES 0 DISLIKES SHARE
0 LIKES 0 DISLIKES 2 VIEWES SHARE

I am new to flutter, and I want to make sure that I dont have any loose initializations when i pop a screen. Is there a way to check for loose initializations from variables, listeners or streams to avoid memory leaks?

2 Replies

Techiio-commentatorNeel Dey replied 7 months ago0 likes0 dislikes

You can remove all listener or streams by overriding dispose method

  @override
  void dispose() {
    super.dispose();
    //listeners to remove
  }
Techiio-commentatorPeter Daniels replied 7 months ago0 likes0 dislikes

Thanks for your support.

This thread is closed by Peter Daniels
Techiio-logo

Techiio is on the journey to build an ocean of technical knowledge, scouring the emerging stars in process and proffering them to the corporate world.

Follow us on:

Subscribe to get latest updates

You can unsubscribe anytime from getting updates from us
Developed and maintained by Wikiance
Developed and maintained by Wikiance