Is there a boost::shared_ptr equivalent in C#?

前端 未结 5 480
生来不讨喜
生来不讨喜 2021-01-19 05:33

Just curious, I\'ve been using boost:shared_ptr\'s in the past a LOT - for having multiple objects store a shared pointer to a single object etc.

Is there an equival

5条回答
  •  一整个雨季
    2021-01-19 06:34

    No need. .NET has a garbage collector that will take care of cleaning up an object once nothing holds a reference to it.

提交回复
热议问题