When he says that he doesn’t guarantee getting circular links, that’s exactly what it means. Whenever you are data structures containing circular references, the reference count will always be nonzero, which means that reference counting is not enough to decide when to delete them. On the other hand, finding all the circular links after reaching the end of each area will take a long time - at least. This involves analyzing the relationships of all objects with a non-zero number of links.
However, I do not expect you to have a problem with this in general. For a light script, you can simply ignore it. For others, you still have to do some cleaning work at the end of the scope (closing a file or even deleting a circular link), as it would in C, for example, but it's still not as drunk as C.
If this becomes a problem, simply remove the circular reference before you finish with each data object.
source share