[Twisted-Python] Resource instanciated and never destroyed ?

Anand web at anand-fr.net
Tue Sep 20 14:37:40 EDT 2005


I'm using twisted+web (2.0.1) + Nevow (0.4.1) for building a web application.

My web application is inside a "Realm" for handling user authentication.

When an url is requested for a logged in user, this is handled by a resource
called "LoggedIn", which is a nevow rend.Page subclass.
LoggedIn redefines the locateChildMethod. 
That method instanciates and returns a resource object , which can be of any
specific class which I have defined. My resource classes are subclasses of

I've noticed, putting traces in __init__ and __del__ methods of my resource
classes, that resource objects which are instanciated are never destroyed.
As as consequences, the python process ends up eating up a lot of memory.

I guess I might do something the wrong way. 
I would like to know how resource object can be automatically destroyed after a
page has been rendered by Nevow + twisted web.

Thank you for your help 


More information about the Twisted-Python mailing list