[Twisted-Python] xmlrpc protocoll instanze per connection?

exarkun at twistedmatrix.com exarkun at twistedmatrix.com
Mon Aug 9 09:18:09 EDT 2010

On 12:07 pm, petshmidt at googlemail.com wrote:
>>If you want a new XMLRPC instance per request, then create a new one 
>>request.  http://twistedmatrix.com/documents/current/web/howto/web- 
>>/dynamic-dispatch.html may help.
>This works for me too. getChild() returns for each request new
>instance. When is this object destroyed? I've putted print into
>__del__, but can't see it in log.

At the same time any Python object is destroyed, when there are no more 
references to it.  Twisted won't keep any references to it after the 
response has been completely generated.  So as long as your code also 
keeps no references, it will be destroyed shortly after each request.


More information about the Twisted-Python mailing list