mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Guangya Liu <gyliu...@gmail.com>
Subject Re: Review Request 44209: Closed the input ifstream before return error.
Date Tue, 17 May 2016 00:06:40 GMT


> 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
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message