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/2000-December/011026.html below:

[Python-Dev] memory leaks

[Python-Dev] memory leaks [Python-Dev] memory leaksCharles G Waldman cgw@fnal.gov
Thu, 14 Dec 2000 15:06:43 -0600 (CST)
The following code (extracted from test_extcall.py) leaks memory:

class Foo:
   def method(self, arg1, arg2):
        return arg1 + arg2

def f():
    err = None
    try:
        Foo.method(*(1, 2, 3))
    except TypeError, err:
        pass
    del err



One-line fix (also posted to Sourceforge):

--- Python/ceval.c	2000/10/30 17:15:19	2.213
+++ Python/ceval.c	2000/12/14 20:54:02
@@ -1905,8 +1905,7 @@
 							 class))) {
 				    PyErr_SetString(PyExc_TypeError,
 	    "unbound method must be called with instance as first argument");
-				    x = NULL;
-				    break;
+				    goto extcall_fail;
 				}
 			    }
 			}



I think that there are a bunch more memory leaks lurking around...
this only fixes one of them.  I'll send more info as I find out what's
going on.




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