get objects referencing another one

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Olivier Feys

    get objects referencing another one

    I'm working on a tree and I have refcounting problems.
    Is it possible from an object, to get the list of objects referencing it ?

    thanks
  • Diez B. Roggisch

    #2
    Re: get objects referencing another one

    Olivier Feys wrote:
    I'm working on a tree and I have refcounting problems.
    Is it possible from an object, to get the list of objects referencing it ?
    The gc-module might help, but it is somewhat overwhelming.

    Diez

    Comment

    • Bruno Desthuilliers

      #3
      Re: get objects referencing another one

      Olivier Feys a écrit :
      I'm working on a tree and I have refcounting problems.
      Is it possible from an object, to get the list of objects referencing it ?
      Another solution may be to use weak references:
      Source code: Lib/weakref.py The weakref module allows the Python programmer to create weak references to objects. In the following, the term referent means the object which is referred to by a weak...


      HTH

      Comment

      Working...