diff options
Diffstat (limited to 'Objects/dictobject.c')
-rw-r--r-- | Objects/dictobject.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Objects/dictobject.c b/Objects/dictobject.c index 82d247f..9e2b944 100644 --- a/Objects/dictobject.c +++ b/Objects/dictobject.c @@ -205,6 +205,18 @@ show_alloc(void) static PyDictObject *free_list[PyDict_MAXFREELIST]; static int numfree = 0; +void +PyDict_Fini(void) +{ + PyListObject *op; + + while (numfree) { + op = free_list[numfree--]; + assert(PyDict_CheckExact(op)); + PyObject_GC_Del(op); + } +} + PyObject * PyDict_New(void) { |