MLT
7.28.0
|
Cache item class. More...
Public Member Functions | |
void | mlt_cache_item_close (mlt_cache_item item) |
Close a cache item. More... | |
Data Fields | |
mlt_cache | cache |
a reference to the cache to which this belongs More... | |
void * | data |
the opaque pointer to the cached data More... | |
mlt_destructor | destructor |
a function to release or destroy the cached data More... | |
void * | object |
a parent object to the cache data that uniquely identifies this cached item More... | |
int | refcount |
a reference counter to control when destructor is called More... | |
int | size |
the size of the cached data More... | |
Cache item class.
A cache item is a structure holding information about a data object including a reference count that is used to control its lifetime. When you get a a cache item from the cache, you hold a reference that prevents the data from being released when the cache is full and something new is added. When you close the cache item, the reference count is decremented. The data object is destroyed when all cache items are closed and the cache releases its reference.
void mlt_cache_item_close | ( | mlt_cache_item | item | ) |
Close a cache item.
Release a reference and call the destructor on the data object when all references are released.
item | a cache item |
mlt_cache mlt_cache_item_s::cache |
a reference to the cache to which this belongs
void* mlt_cache_item_s::data |
the opaque pointer to the cached data
mlt_destructor mlt_cache_item_s::destructor |
a function to release or destroy the cached data
void* mlt_cache_item_s::object |
a parent object to the cache data that uniquely identifies this cached item
int mlt_cache_item_s::refcount |
a reference counter to control when destructor is called
int mlt_cache_item_s::size |
the size of the cached data