POV-Ray : Newsgroups : povray.off-topic : Question about garbage collection (not a flame) : Re: Question about garbage collection (not a flame) Server Time
4 Nov 2024 13:25:12 EST (-0500)
  Re: Question about garbage collection (not a flame)  
From: Warp
Date: 31 Mar 2008 01:20:11
Message: <47f0829a@news.povray.org>
Orchid XP v8 <voi### [at] devnull> wrote:
> Warp wrote:

> >   I assume that it frees all the objects, not just A, but how does it do
> > it efficiently?

> The simplest (non-broken) GC implementation is the mark/sweep type.

  That really didn't answer my question. I didn't ask for the simplest
solution.

> [Note that I do not consider "reference counting" to be a valid GC 
> algorithm, since it doesn't actually work properly...]

  Yet many languages use it, such as for example PHP and Objective C.

  It just sounds to me that people object about reference counting because
in theory it's problematic, but some people just go ahead and use it anyways
without problems.

  (Yes, I know that in PHP you can actually get circular references which
get never freed, and that's a known problem, but it doesn't seem to cause
too many problems in practice nevertheless, seeing how popular PHP is.
Circular references seem to be a bit like goto: You can come up with all
kinds of situations where it's "necessary", but in practice it happens
rarely if at all.)

-- 
                                                          - Warp


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.