Terry Reedy wrote:
> On 1/20/2013 3:09 PM, Jens Thoms Toerring wrote:
> > thank you for the explanations. I had overlooked the
> > cyclic nature of what I had produced here and, of course,
> > the GC can't be blamed for not collecting objects that are
> > part of a cycle. The other question
On 1/20/2013 3:09 PM, Jens Thoms Toerring wrote:
thank you for the explanations. I had overlooked the
cyclic nature of what I had produced here and, of course,
the GC can't be blamed for not collecting objects that are
part of a cycle. The other question about the last refe-
rence to an obj
Hi,
thank you for the explanations. I had overlooked the
cyclic nature of what I had produced here and, of course,
the GC can't be blamed for not collecting objects that are
part of a cycle. The other question about the last refe-
rence to an object vanishing within a method call (which,
as I
And further thoughts...
On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote:
> Hi,
>
>triggered by some problems I had with PySide I got a bit
> confused about what the GC may do in certain situations. Here's a small
> test program I cobbled together:
>
> import sys
>
> class X(
On 1/19/2013 9:47 AM, Jens Thoms Toerring wrote:
The code comments mostly answer your questions about what happens or
does not happen and when. The comments after add more detail.
import sys
class X( object ) :
def __init__( self, parent, cnt ) :
print( "In constructor for {0}
On Sat, 19 Jan 2013 16:24:37 +, Steven D'Aprano wrote:
> On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote:
>
>> Ok, the destrucor for the first instance of the X class is called only
>> after printing out "After", so the GC didn't delete the object before.
>> But then there are o
On Sat, 19 Jan 2013 14:47:16 +, Jens Thoms Toerring wrote:
> Ok, the destrucor for the first instance of the X class is called only
> after printing out "After", so the GC didn't delete the object before.
> But then there are obviously no calls of the destructors of neither the
> second instan
Hi,
triggered by some problems I had with PySide I got a bit
confused about what the GC may do in certain situations.
Here's a small test program I cobbled together:
import sys
class X( object ) :
def __init__( self, parent, cnt ) :
print( "In constructor for {0} {1}".format( self