> On 五月 16, 2016, 5:47 p.m., Anand Mazumdar wrote: > > Why do we need to close it explicitly? `ifstream` already follows the RAII > > idiom i.e. things are cleaned up upon destruction. What am I missing?
Thanks Anand, got it, http://stackoverflow.com/questions/4802494/do-i-need-to-close-a-stdfstream , I think that we can remove the `input.close()` here. - Guangya ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/44209/#review133392 ----------------------------------------------------------- On 五月 16, 2016, 5:32 a.m., Guangya Liu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/44209/ > ----------------------------------------------------------- > > (Updated 五月 16, 2016, 5:32 a.m.) > > > Review request for mesos, Gilbert Song, Jie Yu, and Timothy Chen. > > > Repository: mesos > > > Description > ------- > > Closed the input ifstream before return error. > > > Diffs > ----- > > src/log/tool/benchmark.cpp 7e1350675bdfe6c44e86b082bc01f692cc72b850 > > Diff: https://reviews.apache.org/r/44209/diff/ > > > Testing > ------- > > make > make check > > > Thanks, > > Guangya Liu > >
