Message228622
From Doc/c-api/gcsupport.rst:
> Constructors for container types must conform to two rules:
>
> #. The memory for the object must be allocated using :c:func:`PyObject_GC_New`
> or :c:func:`PyObject_GC_NewVar`.
>
> #. Once all the fields which may contain references to other containers are
>
> initialized, it must call :c:func:`PyObject_GC_Track`.
_pickle.Pickler and _pickle.Unpickler have the Py_TPFLAGS_HAVE_GC flag, implement tp_traverse and tp_clear, but PyObject_GC_Track is newer called. |
|
Date |
User |
Action |
Args |
2014-10-05 21:52:01 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, terry.reedy, vstinner, christian.heimes, benjamin.peterson, BreamoreBoy |
2014-10-05 21:52:00 | serhiy.storchaka | set | messageid: <1412545920.96.0.774185723143.issue18372@psf.upfronthosting.co.za> |
2014-10-05 21:52:00 | serhiy.storchaka | link | issue18372 messages |
2014-10-05 21:52:00 | serhiy.storchaka | create | |
|