dtk_destroy_texture man page

dtk_destroy_texture — Free a texture


#include <drawtk.h>

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.

Return Value


See Also

dtk_load_image(3), dtk_close(3),

Referenced By

dtk_load_video_file(3), dtk_load_video_gst(3), dtk_load_video_tcp(3), dtk_load_video_test(3), dtk_load_video_udp(3).

Explore man page connections for dtk_destroy_texture(3).

EPFL Draw Toolkit manual 2010