POV-Ray : Newsgroups : povray.general : on #undef : Re: on #undef Server Time
30 Jul 2024 10:24:02 EDT (-0400)
  Re: on #undef  
From: Warp
Date: 24 Mar 2009 09:50:14
Message: <49c8e515@news.povray.org>
[GDS|Entropy] <gds### [at] hotmailcom> wrote:
> Does pov perform GC on your code effectively (based on #undef docs, it looks 
> like it does not), or do you need to explicitly call GC for certian 
> scenarios?

  I'm not sure the term "garbage collection" can be applied to the SDL at
all. There's no way to "leak memory", in other words, allocate memory and
then drop all reference to it without ever freeing it.

  Each identifier name corresponds to some object in memory (not talking
about POV-Ray objects here). You can't have multiple references to the
same object, nor can you "drop" all references to some object and leave
the object unreachable.

  It may be possible to explicitly free memory with #undef (I have to admit
I don't know what #undef does internally), but that's not really related to
"garbage collection", which is the act of collecting all memory to which
there is no references anylonger.

-- 
                                                          - Warp


Post a reply to this message

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