Circular references and python

Tres Seaver tseaver at starbase.neosoft.com
Thu Feb 3 10:27:58 EST 2000


In article <5ddm4.17487$3b6.72083 at ozemail.com.au>,
Jason Stokes <jstok at bluedog.apana.org.au> wrote:
>
>James Logajan wrote in message <3899026C.7FD4481E at Lugoj.Com>...
>>Neel Krishnaswami wrote:
>>> Apply Neil Schemenauer's patches that convinces Python to use the
>>> Boehm garbage collector, or just live with the garbage, if your
>>> program is relatively short-lived. You can find his patch at:
>>>
>>>   http://www.acs.ucalgary.ca/~nascheme/python/gc.html
>>>
>>> Manually freeing memory is ugly and error-prone. Don't do it. :)
>>
>>The vast majority of code (and programming languages) in the world require
>>explicit memory de-allocation. I don't believe that a GC scheme has yet
>been
>>invented that will work well for all problem domains. I'm sure if it had,
>>we'd all be using it by now. ;)
>
>First of all we should distinguish language from implementations of
>languages, but in this case the line is a little blurry.
>
>LISP, Smalltalk, Java, Delphi and Eiffel implementations all use garbage
>collection as a standard techniqure.  More pertinantly, I don't *want* to
>manually manage object deallocation in my application, and manual memory
>management is the kind of low level process I expect a scripting language to
>protect me from.  I definitely think the Python interpreter should have a
>standard garbage collection mode, if only as an option.

Minor nit:  Delphi does NOT use GC -- VCL components all have owners, who
normally clean them up automagically when the owner is destroyed.  This is
much more like Python's refcount scheme than any "real" GC.

Greasing-the-sieve-of-Eratosthenes'ly,

Tres.
-- 
---------------------------------------------------------------
Tres Seaver           tseaver at palladion.com       713-523-6582
Palladion Software    http://www.palladion.com



More information about the Python-list mailing list