[sword-devel] bug found?
Martin Gruner
sword-devel@crosswire.org
Mon, 3 Mar 2003 17:25:17 +0100
Another small thing I noticed: If somebody uses FileMgr to open a file, and
then deletes the FileDesc object, the FileMgr will still have a pointer to it
in its list. ~FileDesc() should probably tell its parent about it, or be made
private instead, to avoid possible program crashes.
Martin
Am Montag, 3. März 2003 17:16 schrieb Martin Gruner:
> While looking through some sources to improve the docs, I noticed something
> that might be a possible bug in FileMgr.
>
> It looks like
>
> FileDesc *open (const char *path, int mode, int perms = S_IREAD |
> S_IWRITE, bool tryDowngrade = false);
>
> will add the newly created file to the internal list of files that FileMgr
> keeps, but
>
> FileDesc *open (const char *path, int mode, bool tryDowngrade);
>
> won't do so, though both functions are public. Could somebody who knows
> more tell me if this is correct and why this is so?
> Thanks,
>
> Martin
>
> _______________________________________________
> sword-devel mailing list
> sword-devel@crosswire.org
> http://www.crosswire.org/mailman/listinfo/sword-devel