↧
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 ArticleAnswer 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 ArticlePublish/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