dynamic_array.h v0.3.1
Reference-counted dynamic arrays for C
Loading...
Searching...
No Matches
Public Attributes | List of all members
da_array_t Struct Reference

Reference-counted dynamic array structure. More...

#include <dynamic_array.h>

Public Attributes

DA_ATOMIC_INT ref_count
 Reference count (atomic if DA_ATOMIC_REFCOUNT=1)
 
int length
 Current number of elements.
 
int capacity
 Allocated capacity.
 
int element_size
 Size of each element in bytes.
 
void * data
 Pointer to element data.
 
void(* retain_fn )(void *)
 Optional retain function called when elements added (NULL if not needed)
 
void(* release_fn )(void *)
 Optional release function called when elements removed (NULL if not needed)
 

Detailed Description

Reference-counted dynamic array structure.

Note
Do not access fields directly - use provided functions and macros
Atomic reference counting when DA_ATOMIC_REFCOUNT=1

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