POV-Ray : Newsgroups : povray.off-topic : C++ questions : Re: C++ questions Server Time
7 Sep 2024 11:22:44 EDT (-0400)
  Re: C++ questions  
From: Darren New
Date: 26 Sep 2008 12:35:35
Message: <48dd0f57$1@news.povray.org>
Warp wrote:
>   Unless I'm completely mistaken, this is not something you can achieve
> in Java. (In Java you have to close files explicitly and catch all
> possible exceptions which might otherwise bypass that closing.)

The destructor will close the file when the GC collects the object, but 
that might be several seconds later. And it might not run if you exit 
the program before the GC runs, but that's true of C++ also. So it's not 
quite as nicely deterministic, but it still happens eventually.

-- 
Darren New / San Diego, CA, USA (PST)


Post a reply to this message

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