summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorVladimir Marangozov <vladimir.marangozov@t-online.de>2000-08-06 22:45:31 (GMT)
committerVladimir Marangozov <vladimir.marangozov@t-online.de>2000-08-06 22:45:31 (GMT)
commitf9d20c37864316e0cd343e0b9bbac638a7590ad5 (patch)
tree6feeeca35f8e45047d6a60601cdb1f0fcad7ea25 /Doc/lib
parent5bcb215e6e2137048a809c0411d950886ea3b0cb (diff)
downloadcpython-f9d20c37864316e0cd343e0b9bbac638a7590ad5.zip
cpython-f9d20c37864316e0cd343e0b9bbac638a7590ad5.tar.gz
cpython-f9d20c37864316e0cd343e0b9bbac638a7590ad5.tar.bz2
Neil Schemenauer: GC enable(), disable(), isenabled() interface.
Small stylistic changes by VM: - is_enabled() -> isenabled() - static ... Py_<func> -> static ... gc_<func>
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libgc.tex26
1 files changed, 19 insertions, 7 deletions
diff --git a/Doc/lib/libgc.tex b/Doc/lib/libgc.tex
index c5ecfcf..9e097ec 100644
--- a/Doc/lib/libgc.tex
+++ b/Doc/lib/libgc.tex
@@ -5,18 +5,30 @@
\moduleauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca}
\sectionauthor{Neil Schemenauer}{nascheme@enme.ucalgary.ca}
-This module provides an interface to the optional garbage collector.
-It provides the ability to disable the collector, tune the collection
+This module provides an interface to the optional garbage collector. It
+provides the ability to disable the collector, tune the collection
frequency, and set debugging options. It also provides access to
-unreachable objects that the collector found but cannot free. Since
-the collector supplements the reference counting already used in
-Python, you can disable the collector if you are sure your program
-does not create reference cycles. The collector can be disabled by
-calling \code{gc.set_threshold(0)}. To debug a leaking program call
+unreachable objects that the collector found but cannot free. Since the
+collector supplements the reference counting already used in Python, you
+can disable the collector if you are sure your program does not create
+reference cycles. Automatic collection can be disabled by calling
+\code{gc.disable()}. To debug a leaking program call
\code{gc.set_debug(gc.DEBUG_LEAK)}.
The \module{gc} module provides the following functions:
+\begin{funcdesc}{enable}{}
+Enable automatic garbage collection.
+\end{funcdesc}
+
+\begin{funcdesc}{disable}{}
+Disable automatic garbage collection.
+\end{funcdesc}
+
+\begin{funcdesc}{isenabled}{}
+Returns true if automatic collection is enabled.
+\end{funcdesc}
+
\begin{funcdesc}{collect}{}
Run a full collection. All generations are examined and the
number of unreachable objects found is returned.