A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-December/031530.html below:

[Python-Dev] New leak

[Python-Dev] New leakTim Peters tim@zope.com
Tue, 31 Dec 2002 14:40:06 -0500
"A leak" in the datetime test turned out to be in the scaffolding that
prints the current refcount.  Here's a whittled test:

import sys
lastrc = 0
while True:
    thisrc = sys.gettotalrefcount()
    if 1:   # change 1 to 0 and there's no leak
        x = '*' * 10  # This leaks; ditto tuple times int, or list times int
    print >> sys.stderr, 'total refs:', thisrc, 'delta:', thisrc - lastrc
    lastrc = thisrc

Run that in a debug build, and it leaks one reference per loop trip.




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4