LoginSignup
2
3

More than 5 years have passed since last update.

boostのサンプルを解読していく

Last updated at Posted at 2015-02-14

Asio

sample version lang memo
buffers 1.57.0 C++11 Asioではコールバックでハンドラを登録するため、メモリの制御が難しい。ここでは shared_ptrをrambda関数にキャプチャさせ制御を行う方法を使っている
buffers 1.57.0 C++03 上記のC++03版。C++11ではラムダキャプチャでshared_ptrを保持していたが、C++03ではboost::bindで保持するのが良さそう
allocation 1.57.0 C++11 async命令のハンドラー登録時に ハンドラコピー用メモリのallocate deallocateが発生するが、custom_handlerを作成し allocate deallocateを制御できる
2
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
3