Skip to content

Commit a2afbd9

Browse files
committed
fix file.h doc
1 parent afe7980 commit a2afbd9

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

ortools/base/file.h

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,14 +32,12 @@ class File {
3232
#ifndef SWIG // no overloading
3333
// Opens file "name" with flags specified by "mode".
3434
// Flags are defined by fopen(), that is "r", "r+", "w", "w+". "a", and "a+".
35-
// The caller should free the File after closing it by passing the returned
36-
// pointer to delete.
35+
// The caller should call Close() to free the File after closing it.
3736
static File* Open(absl::string_view filename, absl::string_view mode);
3837

3938
// Opens file "name" with flags specified by "mode".
4039
// If open failed, program will exit.
41-
// The caller should free the File after closing it by passing the returned
42-
// pointer to delete.
40+
// The caller should call Close() to free the File after closing it.
4341
static File* OpenOrDie(absl::string_view filename, absl::string_view mode);
4442
#endif // SWIG
4543

@@ -71,7 +69,7 @@ class File {
7169
// Writes a string to file and append a "\n".
7270
bool WriteLine(absl::string_view line);
7371

74-
// Closes the file.
72+
// Closes the file and delete the underlying FILE* descriptor.
7573
bool Close();
7674
absl::Status Close(int flags);
7775

0 commit comments

Comments
 (0)