#pragma once

#include <stddef.h>

typedef struct
{
    int ref_count;
    void (*destructor)(void *self);
} ref_header;

void *rc_alloc(size_t size, void (*destructor)(void *self));
void rc_retain(void *obj);
void rc_release(void *obj);
