struct weak_handle_t;
struct chunk_info_t {
// ...
struct weak_handle_t *weak_handle; // linked list
// ...
};
struct handle_t {
chunk_info_t *chunk;
};
struct weak_handle_t {
struct handle_t *handle; // not for inheritance use. NULL when auto-free'd
};
Handy for caches where data should be thrown out as needed.
Inga kommentarer:
Skicka en kommentar