effective c++ 条款26 postpone variable definition as long as possible

因为构造和析构函数有开销,所以也许前面定义了,还没用函数就退出了。

所以比较好的方法是用到了才定义。

posted @ 2014-07-11 03:01  williamwood  阅读(146)  评论(0编辑  收藏  举报