[Zope-dev] Re: Python 2.0; Garbage Collection

Toby Dickenson tdickenson@geminidataloggers.com
Fri, 06 Oct 2000 16:14:38 +0100


[Toby]

> It looks like a little work is needed to support 2.0's garbage collection of
> cyclic trash 

[Neil]

> Which 2.0 are you using?

I was basing my comments on my last attempt in mid July.


Ive just tried enabling WITH_CYCLE_GC again (and with the patch below)
and it does all seem to be working happily. Ill make further tests
next week. 



Index: z2.py
===================================================================
RCS file: /home/cvs/development/external/Zope2/z2.py,v
retrieving revision 1.4
retrieving revision 1.7
diff -c -4 -r1.4 -r1.7
***************
*** 430,443 ****
              if v=='-': v=''
              DNS_IP=v
          elif o=='-u': UID=v
          elif o=='-D':
              os.environ['Z_DEBUG_MODE']='1'
              DEBUG=1
          elif o=='-S': sys.ZMANAGED=1
          elif o=='-X':
--- 429,448 ----
              if v=='-': v=''
              DNS_IP=v
          elif o=='-u': UID=v
          elif o=='-D':
+             try:
+                 import gc
+             except ImportError:
+                 pass
+             else:
+                 gc.set_debug(gc.DEBUG_LEAK)
              os.environ['Z_DEBUG_MODE']='1'
              DEBUG=1
          elif o=='-S': sys.ZMANAGED=1
          elif o=='-X':





Toby Dickenson
tdickenson@geminidataloggers.com