如果这些东西是class memeber,你就要自己implement copy constructor, = and destructor。通常是一起来的。C#因为有garbage collection这些东西简单些,养成用完的object = null,connection, file, stream 等都主动去close就好了。