Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
Flags
safe-html, strict-same
Loading…
|
Translation uploaded |
|
|
String added in the repository |
|
However, sometimes shared ownership is needed. Specifically, that the lifetime extension of the memory resource should be automatic. For example, if a library wants to return a container which owns an instance of the library's custom memory resource as shown below:然而,有时需要共享所有权,即内存资源的生命周期应自动延长。例如,若某个库希望返回一个容器,该容器拥有该库自定义内存资源的实例,如下所示: