Fix a memory leak in Flutter (

Поділитися
Вставка
  • Опубліковано 29 вер 2024
  • We fix a memory leak in the Flutter framework. This work was brought to you by my GitHub sponsors. Please consider becoming a monthly sponsor, too! github.com/spo...
    ✪ Start a bounty 👉 flutterbountyh...
    ✪ Say, Hi 👉 / flutterbounties

КОМЕНТАРІ • 59

  • @aytunch
    @aytunch 3 місяці тому +9

    Perfect real time contribution from investigation to PR. You deserve to be sponsored by many more of us!

  • @brethagen7776
    @brethagen7776 2 місяці тому

    I love that you fully setup your tests and didn't use global objects. It's really great to not abuse DRY in tests so the SETUP of the test is very explicit on the requirements. A little "setup" method is fine here or there. But these end up getting reused over and over where not all of the setup is really needed and tests are bloated.

    • @FlutterBountyHunters
      @FlutterBountyHunters  2 місяці тому

      Definitely. Centralization, including re-use of globals, is a (possible) performance improvement, and a (possible) typing reduction, at the cost of organizational communication. In most cases, communication between programmers is harder to maintain than performance and speed of typing.

  • @britannio
    @britannio 3 місяці тому

    Could you use git interactive staging (git add -p) to avoid committing the formatting changes?

    • @britannio
      @britannio 3 місяці тому

      Or just the IntelliJ git diff UI.

    • @FlutterBountyHunters
      @FlutterBountyHunters  3 місяці тому

      Yeah both of those would probably have worked. But I never use those tools so I'd have to deal with the learning curve there first.

  • @abdushakoor0099
    @abdushakoor0099 3 місяці тому +11

    This was so cool to watch.

  • @Elguri-yk7rb
    @Elguri-yk7rb 3 місяці тому +6

    I want to see more of this kind of educational videos

  • @patrickwitter4437
    @patrickwitter4437 3 місяці тому +6

    This is insane ! How have I not heard about this channel before. Keep it up

  • @AkashSingh-cr7ly
    @AkashSingh-cr7ly 3 місяці тому +4

    That's awesome work you are doing, lots of learning here, keep it up.

  • @abdullahalamodi5455
    @abdullahalamodi5455 3 місяці тому +4

    this is really next level of tutorials, keep it up, thank you .

  • @mboyamichael7618
    @mboyamichael7618 3 місяці тому +4

    Great Work!

  • @ShawnBlais
    @ShawnBlais 3 місяці тому +1

    Seems like you just didn't register that value is a `ValueNotifier` and it's updated in `onTriggered`. So it's totally expected that you couldn't find anywhere where it updates the value internally. By design it defers to `onTriggered` to set the value, and the widget uses `notifier.addListener` to act on those changes.

  • @maherov1930
    @maherov1930 3 місяці тому +1

    I don't believe that you need to remove the history of undo redo if the widget lost focus
    , but only if it is disposed.....if we write in text field some texts and then jumped to another one, in your case we can not redo anything right?
    I hope you got my points cuz English is my second language

    • @FlutterBountyHunters
      @FlutterBountyHunters  2 місяці тому

      That point relates more to Flutter's undo/redo feature, rather than this bug fix. Regardless of how undo/redo works across multiple focus nodes, there was a memory leak that needed to be fixed.

  • @mohamed-fatta
    @mohamed-fatta 2 місяці тому +1

    I don't even code in Flutter but i love your explanation of the Bug and the critical thinking, thank you

  • @sudipraaz
    @sudipraaz 2 місяці тому

    flutter USSD background processing plugin need for single and multi-session with dynamic sim 1 or sim 2 choosing function plugin needed. help anyone

  • @maurice9826
    @maurice9826 2 місяці тому

    could you record a video showing the settings of your IDE?
    i would like to leave vscode, intelijj seems to be better for working with android and java

  • @oleh6836
    @oleh6836 Місяць тому

    Every few minutes of the video I wanted to say, "Hey, hey, I know the answer to your question."

  • @msiprime
    @msiprime 21 день тому

    Love your vids. I am new here. Hoping to learn a lot that is happening on background

  • @zawhtetnaing5035
    @zawhtetnaing5035 2 місяці тому +1

    Awsome video. Learned a lot from this. Will you be doing Live Streams in the future?

  • @aliounesakho8582
    @aliounesakho8582 2 місяці тому

    hi i'm new here and i wanna say i dont regret at all the time i spend here. it was an absolute pleasure to watch. +1 sub +1 like

  • @SlNightFury422
    @SlNightFury422 2 місяці тому +1

    Respect. 🎈🎈🎈🎈💓💓💓💓

  • @verticrow
    @verticrow 3 місяці тому +1

    Really awesome to see the whole process! Thanks for all that you do.

  • @NoName-rp6cx
    @NoName-rp6cx Місяць тому

    Very informative, thank you!

  • @ferdynandkiepski5026
    @ferdynandkiepski5026 2 місяці тому

    You have auto in C++, but many codebases forbid it. The same with the lint to specify the type. LLVM style makes the most sense to me, with allowing auto when it improves readability. Do you think that devs don't think as much about the lifetimes of objects and freeing them at the end of it, in a GC language like Dart? Also how is the performance of Dart compared to Go? Regarding the UX of observatory, even though I have never touched it, it is way easier to pick up than a cli debugger like gdb or lldb. Just by looking at it for a bit it made sense.

    • @FlutterBountyHunters
      @FlutterBountyHunters  2 місяці тому

      I'm not familiar with Dart or Go's performance characteristics. The UX for observatory is certainly preferable to a CLI system. But it could also certainly be a lot better - especially for people like me who aren't familiar with standard visualizations of memory usage and other performance analytics.

  • @yurtemre7
    @yurtemre7 2 місяці тому

    Such a great video! ありがとうございます

  • @kishandhankecha
    @kishandhankecha 3 місяці тому +2

    #136245 Could this be the second fix?

    • @FlutterBountyHunters
      @FlutterBountyHunters  3 місяці тому

      Maybe. Navigator is a big mess. It has lots of problems and they touch a lot of places. Is this a problem that's holding you back?

  • @tomjerry5772
    @tomjerry5772 2 місяці тому

    bro i heard it today.. damn yoo. keep it

  • @BrendansReasons
    @BrendansReasons 2 місяці тому

    Who is this, there're no sunglasses

  • @HenryIkoh
    @HenryIkoh 2 місяці тому

    The camera not a big deal. The code is more important.

  • @philcazella7521
    @philcazella7521 2 місяці тому

    So I searched the flutter Issues like with the following "is:open label:P3 memory leak " and second on that list #144871 - [Android] focus_manager _TypeError Null check operator used on a null value
    What are the chances that iOS specific conditional you found at time 33:05 in this video is the cause?
    (comment edited because the referenced timestamp was incorrect)

    • @FlutterBountyHunters
      @FlutterBountyHunters  2 місяці тому

      The timestamp you linked to is at the end of the video.

    • @philcazella7521
      @philcazella7521 Місяць тому

      @@FlutterBountyHunters Opps, my bad.... try 33:05 (it was the part where you were laughing about (defaultTargetPlatform != TargetPlatform.iOS) { )

  • @ulmasbekrakhmatullaev8808
    @ulmasbekrakhmatullaev8808 2 місяці тому

    Poor P3s

  • @nemrdev
    @nemrdev 2 місяці тому

    This is what I call an awesome precise and organized work, keep it up🔥, to be noted, I understand that we sometimes get mad at others mistakes but always remember we’re all humans

  • @mkc11267
    @mkc11267 3 місяці тому

    Learned a lot! I hope I which I could sponsor you but I currently have no work lol. But please continue publishing videos including in your other channel. Your contents are literally diamonds in flutter community.

  • @theGoldyMan
    @theGoldyMan 3 місяці тому

    I felt like Mr Carroll was at the bring of saying some slurs. I was at least. That was a good experience watching this process. Decoding the source of some part of flutter is just madness, I feel we are missing a huge chunk of information about the context in which this feature was developed. Wasn't there a design doc? You have my respect since the times before you deleted your flutter challenges, I miss them so much. Keep up the good work. Thanks a lot for this video.

  • @mattlampe
    @mattlampe 3 місяці тому

    This was very cool to watch, I've made some contributions to packages I've changed/fixed before and that always feels really cool, but this made fixing something in the flutter framework feel more approachable as it always seemed so daunting before. Thanks for making this video!

  • @seriouslyiknowhowtoread
    @seriouslyiknowhowtoread 2 місяці тому

    Dude, straight up I will be becoming a sponsor as soon as my project gets ready for Flutter development ( 2 months )

  • @이승현-c2r
    @이승현-c2r 2 місяці тому

    perfect video. subs!

  • @DominikRoszkowski
    @DominikRoszkowski 2 місяці тому

    That's been a cool journey :)

  • @ferekfrankburt
    @ferekfrankburt 3 місяці тому

    Выглядит вроде как не сложно

  • @iamvalenci4
    @iamvalenci4 2 місяці тому

    beautiful, really next level

  • @momshaddinury
    @momshaddinury 2 місяці тому

    This is the kind of video a lot of us need right now. Please keep this up. I am going to share this with my community.

    • @FlutterBountyHunters
      @FlutterBountyHunters  2 місяці тому

      Would love to do more. I'm currently waiting for 3 more people (20) to sponsor me monthly on GitHub. That's when I'll fix the next bug.

    • @momshaddinury
      @momshaddinury 2 місяці тому

      @@FlutterBountyHunters Would you kind enough address the fix for the following error?
      Target of URI doesn't exist: 'package:process_runner/process_runner.dart'.
      Try creating the file referenced by the URI, or try using a URI for a file that does exist.

    • @momshaddinury
      @momshaddinury 2 місяці тому

      Never mind, I just realised that test_private is another mini flutter project that has its own dependencies. I just ran pub get inside of it, now it's fixed.

  • @StingSting844
    @StingSting844 3 місяці тому +1

    Good stuff🎉. I think it would be great if talking about the person who contributed to the bug was avoided. Doesn't help the content in anyway

    • @joe5head
      @joe5head 3 місяці тому +3

      When did this happen? Unless I missed it the feeling I got was talking about the code !== Talking about the person who wrote the code. Saying why a certain line should not exist or is bad !== Saying the same about the person who wrote the line
      I think the critical parts of the video have the most potential for insight but can also see that frustrations/rants can be easily misinterpreted

    • @FlutterBountyHunters
      @FlutterBountyHunters  3 місяці тому +2

      As you say, no names were named. Except I said that Taha and Justin are usually helpful with PR reviews.
      When it comes to the code, if we don't acknowledge problems and poor decisions then no one will ever think to change their approach. And if I don't tell the audience that something is a problem, then the audience might start contributing to Flutter and do more of it!