D
Digital Puer
I fixed a bug today that went against my intuition. I am on Linux.
I had a class that fopen'ed some files. When I called delete
on these objects, I expected that the files would be closed
automatically, just as when an application terminates, but
evidently this is not the case. I guess I have to fclose the files
in the destructor.
Is this a correct assessment?
I had a class that fopen'ed some files. When I called delete
on these objects, I expected that the files would be closed
automatically, just as when an application terminates, but
evidently this is not the case. I guess I have to fclose the files
in the destructor.
Is this a correct assessment?