Quantcast
Channel: Publish/Subscribe and Smart pointer - Stack Overflow
Browsing all 3 articles
Browse latest View live
↧

Answer by Franci Penov for Publish/Subscribe and Smart pointer

What you describe is the classic COM pattern for object lifetime control. You need a smart pointer that keeps reference counter on the object - boost::shared_ptr, boost::intrusive_ptr or ATL's CComPtr...

View Article


Answer by metao for Publish/Subscribe and Smart pointer

If I assume your design is viable (it smells funny with zero context, but may well be correct), boost::shared_ptr might be the way to go....

View Article


Publish/Subscribe and Smart pointer

I would like to implement a simple Publish/Subscribe pattern where:A single publisher publishes a token (a pointer to an object) to its subscribers. Publisher and subscribers are all independent...

View Article
Browsing all 3 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>