Giter Site home page Giter Site logo

Comments (2)

snakeru avatar snakeru commented on May 18, 2024

I can remember fighting memory leaks myself.

I'm not very sure if that was xmpppy, but it's very likely. The solution
was to break these dependency loops in del to ease work of GC.

Also, I believe, another solution happened to be to migrate to newer
cpython interpreter, which handled dependency loops. That was early 2007,
so most likely that was CPython 2.6.
Am 14.09.2014 02:00 schrieb "Cyril Peponnet" [email protected]:

I spotted another potential memory leak here:

dispatcher.py:

def SendAndCallForResponse(self, stanza, func, args={}):
    """ Put stanza on the wire and call back when recipient replies.            Additional callback arguments can be specified in args. """
    self._expected[self.send(stanza)]=(func,args)

Actually and contrary to SendAndWaitForResponse, the self._expected dict
remains wired to all stanza/cb receveid as you ca see here:

[image: graph dot]
https://cloud.githubusercontent.com/assets/2277387/4262430/f3d42db0-3ba1-11e4-9325-5c6233f0b67e.png

We clearly see that self._expected contains all ID and what ever they are
linked too.

I try to figure out how to fix this, I'm asking for help about that.

Thanks


Reply to this email directly or view it on GitHub
#18.

from xmpppy.

CyrilPeponnet avatar CyrilPeponnet commented on May 18, 2024

Actually cleaning the _expected dict seems to do the trick.

            if type(session._expected[ID])==type(()):
                cb,args=session._expected[ID]
                del session._expected[ID]

Not sure why only the cb case the _expected dict was not cleared but it seems to fix the memory ballooning issue.

from xmpppy.

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.