1. Kris Hardy
  2. CherryPy


Joseph Tate  committed 55f54dc

Maybe the third time is the charm for calling gc.collect()

  • Participants
  • Parent commits 0e7fbe9
  • Branches default

Comments (0)

Files changed (1)

File cherrypy/lib/gctools.py

View file
  • Ignore whitespace
         # gc_collect isn't perfectly synchronous, because it may
         # break reference cycles that then take time to fully
-        # finalize. Call it twice and hope for the best.
+        # finalize. Call it thrice and hope for the best.
+        gc.collect()
         unreachable = gc.collect()
         if unreachable: