Ticket #2245: cdef-memleak.py

File cdef-memleak.py, 357 bytes (added by redbaron, 6 years ago)

Even simplier test which shows memory leaks

Line 
1from twisted.internet.cdefer import Deferred
2from twisted.python import failure
3
4def cb1(res):
5    return res
6
7class FF(object):
8    def __init__(self,f):
9        self.f = f
10
11def main():
12    for w in xrange(100000):
13        d = Deferred()
14        d.addCallback(cb1)
15        d.callback(FF(failure.Failure(ValueError())))
16
17if __name__=='__main__':
18    main()