I found some code using std::shared_ptr to perform arbitrary cleanup at shutdown. At first I thought this code could not possibly work, but then I tried the fol
I'm trying to transmitt a draco encoded point cloud via socket.io. In the first iteration everything is fine but in every following iteration abort() is being c
Suppose I have the following simple example of C++ inheritance in file.h: class Base {}; class Derived : public Base {}; Then, the following code compiles; tha
std::unique_ptr has 2 template parameters, the second of which is the deleter to be used. Thanks to this fact, one can easily alias a unique_ptr to a type, whic
I am trying to keep a list of connected clients in asio. I have adapted the chat server example from the docs (http://www.boost.org/doc/libs/1_57_0/doc/html/boo
I am using PCL 1.3. Is there any function to convert pointcloud to pointcloud::ptr. I am new at PCL libraries. I have a ROS node subscribing to sensor_msgs/Poin
If I understand correctly, a weak_ptr doesn't increment the reference count of the managed object, therefore it doesn't represent ownership. It simply lets you
I started studying smart pointers of C++11 and I don't see any useful use of std::weak_ptr. Can someone tell me when std::weak_ptr is useful/necessary?
I have this code that doesn't work, but I think the intent is clear: testmakeshared.cpp #include <memory> class A { public: static ::std::shared_pt