Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 98791af

Browse files
committed
Doc and NEWS changes due to Jeremy adding traceback objects to gc.
1 parent fd14d8e commit 98791af

2 files changed

Lines changed: 8 additions & 1 deletion

File tree

Doc/lib/libsys.tex

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,10 @@ \section{\module{sys} ---
109109
exception type and value. If you do need the traceback, make sure
110110
to delete it after use (best done with a \keyword{try}
111111
... \keyword{finally} statement) or to call \function{exc_info()} in
112-
a function that does not itself handle an exception.}
112+
a function that does not itself handle an exception.} \note{Beginning
113+
with Python 2.2, such cycles are automatically reclaimed when garbage
114+
collection is enabled and they become unreachable, but it remains more
115+
efficient to avoid creating cycles.}
113116
\end{funcdesc}
114117

115118
\begin{datadesc}{exc_type}

Misc/NEWS

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ Extension modules
1616

1717
Library
1818

19+
- Traceback objects are now scanned by cyclic garbage collection, so
20+
cycles created by casual use of sys.exc_info() no longer cause
21+
permanent memory leaks (provided garbage collection is enabled).
22+
1923
Tools/Demos
2024

2125
Build

0 commit comments

Comments
 (0)