This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: gc.collect() of dependent elements
cycle-reference may exist between an element and a traceback stored in SardanaValue or SardanaAttribute as a consequence of getting sys.exc_info(). Keeping a list of dependent elements in the scope of delete_element() makes it impossible to gc.collect() to collect the cycled objects. Use has_dependent_elements() in order to determine if there are dependent elements and then call the gc.collect(). Also, do not call it conditionally only for the pseudo counters but for any element type - the cycle may be created for between any alement and a traceback.
- Loading branch information