Y
Hacker News
new
|
ask
|
show
|
jobs
by
zem
4962 days ago
it is not raii as i understand the term. there is no destructor involved in closing the file, there is just a function that opens the file, passes your code the handle, then closes it when you're done.
1 comments
bowyakka
4961 days ago
Doesn't this amount to the same thing ?
link
zem
4961 days ago
it accomplishes the same purpose, but the filehandle gets closed explicitly, not when it goes out of scope and its destructor gets called.
link