Skip to content

Add destructor to fs::File which will close the file #5212

@TD-er

Description

@TD-er

Fs.h doesn't implement a destructor.
It would be nice I guess to have a destructor which calls the close() function, since it is not useful to keep the file open if the File object gets out of scope.
A forgotten call to close() seem to introduce at least a memory leak somewhere, but maybe also other issues I cannot think of yet.

So is it a good idea to add a (virtual) destructor for fs::File ?

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions