lv_cache_drop

Function lv_cache_drop 

Source
pub unsafe extern "C" fn lv_cache_drop(
    cache: *mut lv_cache_t,
    key: *const c_void,
    user_data: *mut c_void,
)
Expand description

Drop a cache entry with the given key. If the entry is not in the cache, nothing will happen to it. If the entry is found, it will be removed from the cache and its data will be freed when the last reference to it is released. @note The data will not be freed immediately but when the last reference to it is released. But this entry will not be found by lv_cache_acquire(). If you want cache a same key again, you should use lv_cache_add() or lv_cache_acquire_or_create(). @param cache The cache object pointer to drop the entry. @param key The key of the entry to drop. @param user_data A user data pointer that will be passed to the free callback.