Couchbase Lite C
Couchbase Lite C API
Data Fields
FLSliceResult Struct Reference

A heap-allocated block of memory returned from an API call. More...

#include </Users/couchbase/workspace/couchbase-lite-c-doc/couchbase-lite-c/vendor/couchbase-lite-core/vendor/fleece/API/fleece/FLSlice.h>

Data Fields

const void * buf
 
size_t size
 

Detailed Description

A heap-allocated block of memory returned from an API call.

The caller takes ownership, and must call FLSliceResult_Release when done with it.

Warning
The contents of the block must not be modified, since others may be using it.
Note
This is equivalent to the C++ class alloc_slice. In C++ the easiest way to deal with a FLSliceResult return value is to construct an alloc_slice from it, which will adopt the reference, and release it in its destructor. For example: alloc_slice foo( CopyFoo() );

Field Documentation

◆ buf

const void* FLSliceResult::buf

◆ size

size_t FLSliceResult::size

The documentation for this struct was generated from the following file: