Navin Gupta wrote:
> In mailnews code there are several instances of opening a new
> nsInputFileStream and/or nsOutputFileStream and then just deleting the
> stream without closing it. One alternative would be to search for all
> such instances in our codebase and close them. Another, less tedious
> alternative would be to close the stream in it's destructor. Is it a
> good programming practice to close the stream in the destructor ?
>
From what I have read on this message thread everyone seems to agree
that closing the
stream in the destructor is a good idea. I think the patch dated 02/23/01
in http://bugzilla.mozilla.org/show_bug?id=69862 takes care of the
idempotent issue
surrounding Close(). However, when I checked in this patch again it caused
another
breakage, http://bugzilla.mozilla.org/show_bug?id=71384.
What should be done to avoid regressions ?
Navin