Negative
Carlos Santander
csantander619 at gmail.com
Mon Feb 27 14:12:15 PST 2006
Andrew Fedoniouk escribió:
>
> This is real life example:
>
> Logger log = getLogger();
> try {
> File outf = getOutputFile(); // state managed outside
> File inf = getInputFile(); // state managed outside
> File tmpf = createTempFile();
> // lots of code
> } catch (Object e) {
> log.logFailure("...");
> throw e;
> } finally {
> delete tmpf;
> }
> log.close();
>
> ----------------------------------
> Andrew.
>
>
This is not rhetorical, but honest: in the cases where you said "state managed
outside", how do you do that? i.e., how do you know for sure that the files will
be closed, provided that destructors are not guaranteed to be run and you can't
return auto references?
--
Carlos Santander Bernal
More information about the Digitalmars-d
mailing list