[Twisted-Python] xmlrpc protocoll instanze per connection?
petshmidt at googlemail.com
Mon Aug 9 09:32:24 EDT 2010
On Mon, Aug 9, 2010 at 3:18 PM, <exarkun at twistedmatrix.com> wrote:
> On 12:07 pm, petshmidt at googlemail.com wrote:
>>> If you want a new XMLRPC instance per request, then create a new one per
>>> request. http://twistedmatrix.com/documents/current/web/howto/web- in-60
>>> /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.
getChild() is only defined in my code, I'm not calling it anywhere. so
it must be framework holding reference returned by getChild. Well now
after some minutes they were destroyed.
> Twisted-Python mailing list
> Twisted-Python at twistedmatrix.com
More information about the Twisted-Python