Mercurial > cpython-lru_cache-weakref
comparison Python/Python-ast.c @ 77998:048d8d9aecf1
Issue #15291: Fix a memory leak where AST nodes where not properly deallocated.
| author | Antoine Pitrou <solipsis@pitrou.net> |
|---|---|
| date | Sun, 08 Jul 2012 12:43:32 +0200 |
| parents | c18a1a82bb07 |
| children | 85cccc38d01c |
comparison
equal
deleted
inserted
replaced
| 77996:8c877ad00bc4 | 77998:048d8d9aecf1 |
|---|---|
| 462 | 462 |
| 463 static void | 463 static void |
| 464 ast_dealloc(AST_object *self) | 464 ast_dealloc(AST_object *self) |
| 465 { | 465 { |
| 466 Py_CLEAR(self->dict); | 466 Py_CLEAR(self->dict); |
| 467 Py_TYPE(self)->tp_free(self); | |
| 467 } | 468 } |
| 468 | 469 |
| 469 static int | 470 static int |
| 470 ast_type_init(PyObject *self, PyObject *args, PyObject *kw) | 471 ast_type_init(PyObject *self, PyObject *args, PyObject *kw) |
| 471 { | 472 { |
