Debugging leaking refcount

  • Thread starter Jean-François Doyon
  • Start date
J

Jean-François Doyon

Hello,

I'm working with Zope 2.7 and Python 2.3.3, and I have some leaks I'm trying
to track down.

So, more generally, I'm wondering what might be good techniques to track
down where references are
not getting released as they should and so on.

As someone who's never done anything like this in the past, here's what I'm
thinking:

1) Is there anyway to find out who owns the references? Or at least who/what
incremented/decremented
the refcounts for a given instance?

2) Or could I add some print statements somewhere that will tell me when a
refcount is being
increased for a given class, and who is doing it? Maybe by doing some
Python/C if I have to?

3) Is there any way to inspect the suspect instances? Connect with gdb or
pdb or something like that? I've
never used a debugger like that unfortunately, any HOW-TO's out there on
this topic?

Any help, pointers, tips on this topic would be greatly appreciated!

Thanks,
J.F.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,776
Messages
2,569,603
Members
45,189
Latest member
CryptoTaxSoftware

Latest Threads

Top