param.call->call(), sizeof(ServerCallbackUnaryImpl)))
ServerCallbackUnaryImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, allocator_state, std::move(param.call_requester));
+ param.call, allocator_state, param.call_requester);
param.server_context->BeginCompletionOp(
param.call, [call](bool) { call->MaybeDone(); }, call);
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
allocator_state_->Release();
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackUnaryImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
param.call->call(), sizeof(ServerCallbackReaderImpl)))
ServerCallbackReaderImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, std::move(param.call_requester));
+ param.call, param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no read reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackReaderImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
ServerCallbackWriterImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
param.call, static_cast<RequestType*>(param.request),
- std::move(param.call_requester));
+ param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no write reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
// DefaultReactor (which is unary).
this->MaybeDone(/*inlineable_ondone=*/false);
}
- ~ServerCallbackWriterImpl() { req_->~RequestType(); }
+ ~ServerCallbackWriterImpl() {
+ if (req_ != nullptr) {
+ req_->~RequestType();
+ }
+ }
const RequestType* request() { return req_; }
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackWriterImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();
param.call->call(), sizeof(ServerCallbackReaderWriterImpl)))
ServerCallbackReaderWriterImpl(
static_cast<::grpc::CallbackServerContext*>(param.server_context),
- param.call, std::move(param.call_requester));
+ param.call, param.call_requester);
// Inlineable OnDone can be false in the CompletionOp callback because there
// is no bidi reactor that has an inlineable OnDone; this only applies to
// the DefaultReactor (which is unary).
reactor_.load(std::memory_order_relaxed)->OnDone();
grpc_call* call = call_.call();
auto call_requester = std::move(call_requester_);
+ if (ctx_->context_allocator() != nullptr) {
+ ctx_->context_allocator()->Release(ctx_);
+ }
this->~ServerCallbackReaderWriterImpl(); // explicitly call destructor
::grpc::g_core_codegen_interface->grpc_call_unref(call);
call_requester();