Skip to content

Commit f84c867

Browse files
authored
Remove an old, elementtree-specific leak detector (GH-31811)
1 parent 304197b commit f84c867

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

Modules/_elementtree.c

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -36,17 +36,6 @@
3636

3737
/* -------------------------------------------------------------------- */
3838

39-
#if 0
40-
static int memory = 0;
41-
#define ALLOC(size, comment)\
42-
do { memory += size; printf("%8d - %s\n", memory, comment); } while (0)
43-
#define RELEASE(size, comment)\
44-
do { memory -= size; printf("%8d - %s\n", memory, comment); } while (0)
45-
#else
46-
#define ALLOC(size, comment)
47-
#define RELEASE(size, comment)
48-
#endif
49-
5039
/* compiler tweaks */
5140
#if defined(_MSC_VER)
5241
#define LOCAL(type) static __inline type __fastcall
@@ -301,7 +290,6 @@ create_new_element(PyObject* tag, PyObject* attrib)
301290

302291
self->weakreflist = NULL;
303292

304-
ALLOC(sizeof(ElementObject), "create element");
305293
PyObject_GC_Track(self);
306294

307295
if (attrib != NULL && !is_empty_dict(attrib)) {
@@ -676,7 +664,6 @@ element_dealloc(ElementObject* self)
676664
*/
677665
element_gc_clear(self);
678666

679-
RELEASE(sizeof(ElementObject), "destroy element");
680667
Py_TYPE(self)->tp_free((PyObject *)self);
681668
Py_TRASHCAN_END
682669
}

0 commit comments

Comments
 (0)