|
|
|
@ -18,6 +18,7 @@ |
|
|
|
|
|
|
|
|
|
#include <grpc/support/port_platform.h> |
|
|
|
|
|
|
|
|
|
#include "src/core/lib/gprpp/memory.h" |
|
|
|
|
#include "src/core/lib/iomgr/port.h" |
|
|
|
|
|
|
|
|
|
#ifdef GRPC_CFSTREAM |
|
|
|
@ -47,7 +48,7 @@ void CFStreamHandle::Release(void* info) { |
|
|
|
|
|
|
|
|
|
CFStreamHandle* CFStreamHandle::CreateStreamHandle( |
|
|
|
|
CFReadStreamRef read_stream, CFWriteStreamRef write_stream) { |
|
|
|
|
return new CFStreamHandle(read_stream, write_stream); |
|
|
|
|
return grpc_core::New<CFStreamHandle>(read_stream, write_stream); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void CFStreamHandle::ReadCallback(CFReadStreamRef stream, |
|
|
|
@ -188,7 +189,7 @@ void CFStreamHandle::Unref(const char* file, int line, const char* reason) { |
|
|
|
|
reason, val, val - 1); |
|
|
|
|
} |
|
|
|
|
if (gpr_unref(&refcount_)) { |
|
|
|
|
delete this; |
|
|
|
|
grpc_core::Delete<CFStreamHandle>(this); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|