screen_destroy_buffer()

Destroy a buffer and frees associated resources

Synopsis:

#include <screen/screen.h>
int screen_destroy_buffer(screen_buffer_t buf)

Arguments:

buf
The handle of the buffer you want to destroy. This buffer must have been created with screen_create_buffer().

Library:

libscreen

Description:

Function Type: Immediate Execution

This function destroys the buffer object associated with the buffer handle. Any resources created for this buffer is also released. The buffer handle can no longer be used as argument in subsequent Screen API calls. The actual memory buffer described by this buffer handle isn't released by this operation. The application is responsible for freeing its own external buffers. Only buffers created with screen_create_buffer() must be destroyed with this function.

Returns:

0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).