On Mon, Aug 9, 2010 at 3:18 PM,  <exar...@twistedmatrix.com> wrote:
> On 12:07 pm, petshm...@googlemail.com wrote:
>>
>> [snip]
>>>
>>> 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.

Thanks

Pet

>
> Jean-Paul
>
>
> _______________________________________________
> Twisted-Python mailing list
> Twisted-Python@twistedmatrix.com
> http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python
>
>

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to