@@ -181,7 +181,7 @@ of that object when the algorithm starts. This is because the algorithm needs
181181to modify the reference count to do the computations and in this way the
182182interpreter will not modify the real reference count field.
183183
184- .. figure :: images /python-cyclic-gc-1-new-page.png
184+ .. figure :: /_static /python-cyclic-gc-1-new-page.png
185185
186186The GC then iterates over all containers in the first list and decrements by one the
187187``gc_ref `` field of any other object that container is referencing. Doing
@@ -190,7 +190,7 @@ using the C API or inherited by a superclass) to know what objects are reference
190190each container. After all the objects have been scanned, only the objects that have
191191references from outside the “objects to scan” list will have ``gc_refs > 0 ``.
192192
193- .. figure :: images /python-cyclic-gc-2-new-page.png
193+ .. figure :: /_static /python-cyclic-gc-2-new-page.png
194194
195195Notice that having ``gc_refs == 0 `` does not imply that the object is unreachable.
196196This is because another object that is reachable from the outside (``gc_refs > 0 ``)
@@ -204,13 +204,13 @@ tentatively unreachable list. The following image depicts the state of the lists
204204moment when the GC processed the ``link_3 `` and ``link_4 `` objects but has not
205205processed ``link_1 `` and ``link_2 `` yet.
206206
207- .. figure :: images /python-cyclic-gc-3-new-page.png
207+ .. figure :: /_static /python-cyclic-gc-3-new-page.png
208208
209209Then the GC scans the next ``link_1 `` object. Because it has ``gc_refs == 1 ``,
210210the gc does not do anything special because it knows it has to be reachable (and is
211211already in what will become the reachable list):
212212
213- .. figure :: images /python-cyclic-gc-4-new-page.png
213+ .. figure :: /_static /python-cyclic-gc-4-new-page.png
214214
215215When the GC encounters an object which is reachable (``gc_refs > 0 ``), it traverses
216216its references using the ``tp_traverse `` slot to find all the objects that are
@@ -225,7 +225,7 @@ objects that have already been visited once (by unsetting the ``PREV_MASK_COLLEC
225225flag) so that if an object that has already been processed is referenced by some other
226226object, the GC does not process it twice.
227227
228- .. figure :: images /python-cyclic-gc-5-new-page.png
228+ .. figure :: /_static /python-cyclic-gc-5-new-page.png
229229
230230Notice that an object that was marked as "tentatively unreachable" and was later
231231moved back to the reachable list will be visited again by the garbage collector
0 commit comments