Skip to content

Commit

Permalink
Remove an old, elementtree-specific leak detector (GH-31811)
Browse files Browse the repository at this point in the history
  • Loading branch information
arhadthedev authored Mar 11, 2022
1 parent 304197b commit f84c867
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Modules/_elementtree.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,17 +36,6 @@

/* -------------------------------------------------------------------- */

#if 0
static int memory = 0;
#define ALLOC(size, comment)\
do { memory += size; printf("%8d - %s\n", memory, comment); } while (0)
#define RELEASE(size, comment)\
do { memory -= size; printf("%8d - %s\n", memory, comment); } while (0)
#else
#define ALLOC(size, comment)
#define RELEASE(size, comment)
#endif

/* compiler tweaks */
#if defined(_MSC_VER)
#define LOCAL(type) static __inline type __fastcall
Expand Down Expand Up @@ -301,7 +290,6 @@ create_new_element(PyObject* tag, PyObject* attrib)

self->weakreflist = NULL;

ALLOC(sizeof(ElementObject), "create element");
PyObject_GC_Track(self);

if (attrib != NULL && !is_empty_dict(attrib)) {
Expand Down Expand Up @@ -676,7 +664,6 @@ element_dealloc(ElementObject* self)
*/
element_gc_clear(self);

RELEASE(sizeof(ElementObject), "destroy element");
Py_TYPE(self)->tp_free((PyObject *)self);
Py_TRASHCAN_END
}
Expand Down

0 comments on commit f84c867

Please sign in to comment.