change shared_ptr<void>() to make_shared< pair<BufferNode, FnXxxCallback> >()