A key technique for ensuring timely resourcerelease is to maintain a strict hierarchy of ownership; with ownership comes the responsibility to release the resource.
确保及时的资源释放的一个关键技巧是维护所有权的一个严格层次结构,其中的所有权具有释放资源的职责。
2
In this situation, you can either catch up the resource from the stream, release your version of the resource to the stream, or merge your work and the stream resource.