开发者

Interface implementation callbacks - management

I've been thinking of creating some callbacks by interface inheritance. The question is, should I take, say, a shared_ptr, a unique_ptr, or a raw pointer? I don't want to define the memory management of the derived class because, well, they should have their own undefined memory ma开发者_开发问答nagement.


std::function?

Your use sounds like exactly what std::function (well boost::function) is perfect for.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜