#include <grpc/support/port_platform.h>
#include <grpc/slice.h>
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/slice/slice_refcount.h"
Go to the source code of this file.
Functions | |
grpc_slice | grpc_slice_ref (grpc_slice slice) |
void | grpc_slice_unref (grpc_slice slice) |
grpc_slice grpc_slice_ref | ( | grpc_slice | s | ) |
Increment the refcount of s. Requires slice is initialized. Returns s.
Definition at line 27 of file slice_api.cc.
void grpc_slice_unref | ( | grpc_slice | s | ) |
Decrement the ref count of s. If the ref count of s reaches zero, all slices sharing the ref count are destroyed, and considered no longer initialized. If s is ultimately derived from a call to grpc_slice_new(start, len, dest) where dest!=NULL , then (*dest)(start) is called, else if s is ultimately derived from a call to grpc_slice_new_with_len(start, len, dest) where dest!=NULL , then (*dest)(start, len). Requires s initialized.
Definition at line 32 of file slice_api.cc.