[Python-checkins] CVS: python/dist/src/Doc/lib libinspect.tex,1.3,1.4

Fred L. Drake fdrake@users.sourceforge.net
Fri, 10 Aug 2001 10:37:35 -0700


Update of /cvsroot/python/python/dist/src/Doc/lib
In directory usw-pr-cvs1:/tmp/cvs-serv15567/lib

Modified Files:
	libinspect.tex 
Log Message:

Added a warning about reference cycles and memory consumption to the
section on functions which return stack frames.

This closes SF bug #449258.


Index: libinspect.tex
===================================================================
RCS file: /cvsroot/python/python/dist/src/Doc/lib/libinspect.tex,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** libinspect.tex	2001/04/10 15:12:34	1.3
--- libinspect.tex	2001/08/10 17:37:33	1.4
***************
*** 265,268 ****
--- 265,278 ----
  context to return, which are centered around the current line.
  
+ \strong{Warning:}  Keeping references to frame objects, as found in
+ the first element of the frame records these functions return, can
+ cause your program to create reference cycles.  Once a reference cycle
+ has been created, the lifespan of all objects which can be accessed
+ from the objects which form the cycle can become much longer even if
+ Python's optional cycle detector is enabled.  If such cycles must be
+ created, it is important to ensure they are explicitly broken to avoid
+ the delayed destruction of objects and increased memory consumption
+ which occurs.
+ 
  \begin{funcdesc}{getouterframes}{frame\optional{, context}}
    Get a list of frame records for a frame and all higher (calling)