tag:blogger.com,1999:blog-6144117508697071990.post2881929782862045095..comments2024-03-20T16:17:27.753-04:00Comments on Tips, Tricks and Tools: Is it necessary to manually close ifstream/ofstream/fstreamUnknownnoreply@blogger.comBlogger2125tag:blogger.com,1999:blog-6144117508697071990.post-20854114824480994932012-11-28T10:45:22.427-05:002012-11-28T10:45:22.427-05:00Sorry, I meant: GCC will optimize away the additio...Sorry, I meant: GCC will optimize away the additional close() call.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-6144117508697071990.post-78531615096056143962012-11-26T18:55:55.708-05:002012-11-26T18:55:55.708-05:00GCC will most likely inline the empty destructor c...GCC will most likely inline the empty destructor call. If it doesn't, then increase the -O, or most likely it's something you should not bother with.<br /><br />Do not optimize early. Never rely on implementation details (what about a different version of GCC?). Do not give optimization advice until you've measured the gain (how many files is the average program going to close in its Anonymousnoreply@blogger.com