diff options
author | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2000-09-22 15:22:38 (GMT) |
---|---|---|
committer | Neil Schemenauer <nascheme@enme.ucalgary.ca> | 2000-09-22 15:22:38 (GMT) |
commit | 544de1effb6b730d68433fde7828bf90bc50fe35 (patch) | |
tree | 43ae94ee19f619fea40911e561b5c2c5290d32ad /Doc | |
parent | 676940b49742309dd8914edc9ed276cfd38aa557 (diff) | |
download | cpython-544de1effb6b730d68433fde7828bf90bc50fe35.zip cpython-544de1effb6b730d68433fde7828bf90bc50fe35.tar.gz cpython-544de1effb6b730d68433fde7828bf90bc50fe35.tar.bz2 |
- Add DEBUG_SAVEALL option. When enabled all garbage objects found by the
collector will be saved in gc.garbage. This is useful for debugging a
program that creates reference cycles.
- Fix else statements in gcmodule.c to conform to Python coding standards.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libgc.tex | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Doc/lib/libgc.tex b/Doc/lib/libgc.tex index 5a744c3..a39f755 100644 --- a/Doc/lib/libgc.tex +++ b/Doc/lib/libgc.tex @@ -85,7 +85,9 @@ The following variable is provided for read-only access: A list of objects which the collector found to be unreachable but could not be freed (uncollectable objects). Objects that have \method{__del__()} methods and create part of a reference cycle cause -the entire reference cycle to be uncollectable. +the entire reference cycle to be uncollectable. If +\constant{DEBUG_SAVEALL} is set, then all unreachable objects will +be added to this list rather than freed. \end{datadesc} @@ -117,8 +119,14 @@ When \constant{DEBUG_COLLECTABLE} or \constant{DEBUG_UNCOLLECTABLE} is set, print information about objects other than instance objects found. \end{datadesc} +\begin{datadesc}{DEBUG_SAVEALL} +When set, all unreachable objects found will be appended to +\var{garbage} rather than being freed. This can be useful for debugging +a leaking program. +\end{datadesc} + \begin{datadesc}{DEBUG_LEAK} The debugging flags necessary for the collector to print information about a leaking program (equal to \code{DEBUG_COLLECTABLE | -DEBUG_UNCOLLECTABLE | DEBUG_INSTANCES | DEBUG_OBJECTS}). +DEBUG_UNCOLLECTABLE | DEBUG_INSTANCES | DEBUG_OBJECTS | DEBUG_SAVEALL}). \end{datadesc} |