void dtk_destroy_texture(dtk_htex tex);
This function frees the ressource associated with a texture tex. If the texture is used several times, i.e. several call to dtk_load_image() with the same image path, it decreases the number of uses by one.
Calling dtk_destroy_texture() on each created texture is currently not mandatory since all texture remaining textures are destroyed when the last window is closed. However, if no window can be closed (for example, no window has been created), dtk_destroy_texture() should be called on each created texture to avoid any memory leak.
dtk_destroy_texture() is thread-safe.