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