Coder Social home page Coder Social logo

Comments (7)

kuhnroyal avatar kuhnroyal commented on July 22, 2024 1

I tried to enable the new leak tracking but didn't get very far yet...

from dio.

AlexV525 avatar AlexV525 commented on July 22, 2024

Could you attach the minimal reproducible example and some analysis graphs or details?

from dio.

zambetpentru avatar zambetpentru commented on July 22, 2024

We have noticed an Out of Memory error as well, on iOS since 5.4.x.

Our issue was casting the .get to <List> unnecessarily even though it supports Uint8List.

from dio.

AlexV525 avatar AlexV525 commented on July 22, 2024

@kuhnroyal I have been thinking about the cause of this issue for the last few days, it could be caused by referencing the resources of the request in callers like .whenComplete so they will only get released once the CancelToken canceled, but it doesn't, so memory leaks. Any ideas?

from dio.

AlexV525 avatar AlexV525 commented on July 22, 2024

If yes, we might add a global map to cache the necessary instances for the corresponding cancel token.

from dio.

kunstmusik avatar kunstmusik commented on July 22, 2024

@AlexV525 I haven't had time to followup, but yes, as mentioned in my first message, we found that the .whenComplete callback captures over the Request:

      if (cancelFuture != null) {
        cancelFuture.whenComplete(() => request.abort());
      }

and whenComplete() also adds additional handlers each time it is called. So if a CancelToken is passed in to multiple fetches, it will keep accruing whenComplete handlers that all capture over individual requests.

from dio.

AlexV525 avatar AlexV525 commented on July 22, 2024

@kunstmusik Can you verify if #2252 fixes the issue?

from dio.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.