POV-Ray : Newsgroups : povray.advanced-users : the POV-ray SDL--similar to Java and/or Python? : Re: the POV-ray SDL--similar to Java and/or Python? Server Time
7 Oct 2024 00:29:03 EDT (-0400)
  Re: the POV-ray SDL--similar to Java and/or Python?  
From: Warp
Date: 13 Sep 2006 19:28:43
Message: <4508942b@news.povray.org>
Darren New <dne### [at] sanrrcom> wrote:
> You have to also account for the object's reference count 
> overflowing, for example.

  It's impossible for a reference counter to overflow. You can't allocate
that much memory. You can't have pointers pointing to that many objects
in the first place.

  If you had to manage more data than the pointer size of the architecture
can point to, then everything handling the data will be bigger&slower
anyways. A reference counter won't matter much.

> You can allocate 100,000 individual objects and 
> free them all with one instruction.

  Assuming no memory fragmentation, of course.

  Besides, a reference-counting system doesn't have to *free* the
objects immediately when the last reference dies. It can mark the
object as "to be freed" and put it somewhere to wait.

  Btw, how does the GC engine know that the object is not used anymore?

-- 
                                                          - Warp


Post a reply to this message

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