Why so many references to global variables?
Erik Max Francis
max at alcyone.com
Thu Jul 3 20:22:39 EDT 2003
J-P wrote:
> Well, sys.getrefcount() does tell me there are 3 millions references
> to it and other globals. Even though this doesn't eat up all my memory
> (how large is a reference object in Python?), ...
Reference counts are just maintained internally with a single number
that's incremented or decremented.
> I definitely think
> there's
> something fishy with keeping that many references to global variables
> that appear here and there in the script.
Yes, it does. It strongly suggests that the fishiness is in your C
extension.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ Now I must follow them!
\__/ Beowulf, King of the Geats
More information about the Python-list
mailing list