¡@

Home 

c++ Programming Glossary: shared_from_this

Boost async_* functions and shared_ptr's

http://stackoverflow.com/questions/11356742/boost-async-functions-and-shared-ptrs

I frequently see this pattern in code binding shared_from_this as the first parameter to a member function and dispatching.. this read_buffer_ boost bind Connection handle_Receive shared_from_this boost asio placeholders error boost asio placeholders bytes_transferred.. asio placeholders bytes_transferred The only reason to use shared_from_this instead of this is to keep the object alive until the member..

Code::Blocks and Boost Asio. It just wont work [closed]

http://stackoverflow.com/questions/11497160/codeblocks-and-boost-asio-it-just-wont-work

array.hpp #include boost bind.hpp #include boost enable_shared_from_this.hpp #include boost noncopyable.hpp #include boost shared_ptr.hpp.. Handler a h class session public boost enable_shared_from_this session public session boost asio io_service io_service socket_.. allocator_ boost bind session handle_read shared_from_this boost asio placeholders error boost asio placeholders bytes_transferred..

Getting a boost::shared_ptr for this

http://stackoverflow.com/questions/142391/getting-a-boostshared-ptr-for-this

share improve this question You can derive from enable_shared_from_this and then you can use shared_from_this instead of this to spawn.. derive from enable_shared_from_this and then you can use shared_from_this instead of this to spawn a shared pointer to your own self object... own self object. Example in the link #include boost enable_shared_from_this.hpp class Y public boost enable_shared_from_this Y public shared_ptr..

How to handle 'this' pointer in constructor?

http://stackoverflow.com/questions/2510521/how-to-handle-this-pointer-in-constructor

have code such as shared_ptr Parent and boost provides the shared_from_this method which the parent can give to the child. My problem is.. which the parent can give to the child. My problem is that shared_from_this cannot be used in a constructor which isn't really a crime because..

enable_shared_from_this (c++0x): what am I doing wrong?

http://stackoverflow.com/questions/4428023/enable-shared-from-this-c0x-what-am-i-doing-wrong

c 0x what am I doing wrong I'm just toying around with the.. new c standard. However I fail to grasp the usage of the shared_from_this function. Here is what I have #include iostream #include memory.. memory class CVerboseBornAndDie2 public std enable_shared_from_this CVerboseBornAndDie2 public std string m_Name CVerboseBornAndDie2..

BOOST ASIO - How to write console server

http://stackoverflow.com/questions/5210796/boost-asio-how-to-write-console-server

asio.hpp #include boost bind.hpp #include boost enable_shared_from_this.hpp #include boost shared_ptr.hpp #include iostream using namespace.. using namespace boost asio class Input public boost enable_shared_from_this Input public typedef boost shared_ptr Input Ptr public static.. _command sizeof _command boost bind Input read_handler shared_from_this placeholders error placeholders bytes_transferred void..

Output of cuda program is not what was expected

http://stackoverflow.com/questions/6561005/output-of-cuda-program-is-not-what-was-expected

What are potential dangers when using boost::shared_ptr?

http://stackoverflow.com/questions/701456/what-are-potential-dangers-when-using-boostshared-ptr

am talking about in the comments. class node public enable_shared_from_this node public void set_parent shared_ptr node parent parent_ parent.. node child children_.push_back child child set_parent shared_from_this void frob do_frob if parent_ parent_ frob private void do_frob.. from the code this memory leaks. class node public enable_shared_from_this node public void set_parent shared_ptr node parent parent_ parent..

what is the usefulness of enable_shared_from_this

http://stackoverflow.com/questions/712279/what-is-the-usefulness-of-enable-shared-from-this

is the usefulness of enable_shared_from_this I ran across enable_shared_from_this while reading the Boost.Asio.. usefulness of enable_shared_from_this I ran across enable_shared_from_this while reading the Boost.Asio examples and after reading the.. This example from the boost documentation for enable_shared_from_this class Y public enable_shared_from_this Y public shared_ptr Y..