GoodHope: 第一种写法string会复制两次,第二种写法string只复制一次 [阅读: 478] 2005-12-26 02:02:16 但是第二种写法在多线程下有风险,unlock之后,如果另外一个线程把str释放掉就会出错。