摘要:
A simple (and perhaps overused) example of RAII is a File class. Without RAII, the code might look something like this: File file("/path/to/file");// Do stuff with filefile.close(); In other words, we must make sure that we close the file once we've finished with it. This has two drawb 阅读全文
posted @ 2011-07-11 16:10
SmartVessel
阅读(271)
评论(0)
推荐(0)
浙公网安备 33010602011771号