[pyOpenSSL] memory leak?

Martin Sjögren md9ms at mdstud.chalmers.se
Thu Jan 9 13:07:24 CET 2003


tor 2003-01-09 klockan 10.38 skrev Zoltan Felleg:
> thanks, i'll give it a try not using class methods/attributes for the 
> context/verifycb. (stupid me, the last thing i would think about were 
> cyclic references).

I just had an idea, and it worked out. A simple way to avoid the problem
is to make verifycb a static method:

    def verifycb(conn, cert, errnum, depth, ok):
        return ok
    verifycb = staticmethod(verifycb)

The static method has no reference to any instance objects and will
therefore not create a cycle.


/Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Detta ?r en digitalt signerad	meddelandedel
URL: <http://mail.python.org/pipermail/pyopenssl-users/attachments/20030109/dca3e548/attachment.pgp>


More information about the pyopenssl-users mailing list