Functions
slice_api.cc File Reference
#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"
Include dependency graph for slice_api.cc:

Go to the source code of this file.

Functions

grpc_slice grpc_slice_ref (grpc_slice slice)
 
void grpc_slice_unref (grpc_slice slice)
 

Function Documentation

◆ grpc_slice_ref()

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.

◆ grpc_slice_unref()

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.



grpc
Author(s):
autogenerated on Fri May 16 2025 03:01:31