Is that a memory leak ?

Michael Hudson mwh at python.net
Fri Jan 24 13:03:50 EST 2003


"vonstroheim" <vonstroheim at my-deja.com> writes:

> I am using a windows debug 2.2.2 version and I observe the following
> behavior in the interactive interpreter:
> 
> if I repeatedly enter:
> class A(object):pass
> 
> the number of REFS raises and so does the value returned by
> len(gc.get_objects())
> (even if I use gc.collect())
> 
> but if i use a 'classic class' : 'class A: pass', no increasing is noticed.
> Is that OK or is it a memory leak ?

Err, I think Py_DEBUG implies COUNT_ALLOCS implies new-style classes
are immortal.  So nothing (particularly) untoward here.  If you see
problems in a release build, do shout.

Cheers,
M.

-- 
  Need to Know is usually an interesting UK digest of things that
  happened last week or might happen next week. [...] This week,
  nothing happened, and we don't care.
                           -- NTK Now, 2000-12-29, http://www.ntk.net/




More information about the Python-list mailing list