On Apr 28, 1:57 am, "Shannon -jj Behrens" <[EMAIL PROTECTED]> wrote:
> > I have troubles with the Garbage Collection and Cleanup ob some
> > Objects.
> a) If you have cyclical references in Python, the garbage collector
> will never break the references if any of the objects have a __del__
> method.
I had.
class Crawler(object):
def __init__(self):
self.log = Crawlerlog()
self.regexp = [
( re.compile("somepattern"), self.foobar )
]
def __del__(self):
print "bye"
def foobar(self):
print "FOO!"
It's Offtopic for this list, but why did the reference to an object
function inside of __init__ create a circle?
Greetings
Christoph
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---