[vtkusers] When must I be weary of Python garbage collection?

David Gobbi david.gobbi at gmail.com
Wed Feb 24 09:04:36 EST 2016


On Wed, Feb 24, 2016 at 6:51 AM, Elvis Stansvik <
elvis.stansvik at orexplore.com> wrote:

> 2016-02-24 14:38 GMT+01:00 David Gobbi <david.gobbi at gmail.com>:
>>
>> Because garbage collection is done via reference counting, sometimes gc
>> is delayed due to reference cycles.  But both VTK and Python have cycle
>> detection in their garbage collectors.
>>
>
> Ah yes, I remember reading that observers can give rise to reference
> cycles.
>

Weakrefs can be used to avoid reference cycles in some situations.

 - David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160224/c8958474/attachment.html>


More information about the vtkusers mailing list