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 will also be released. The buffer handle can no longer be used as argument in subsequent screen calls. The actual memory buffer described by this buffer handle is not 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 the buffer was destroyed, or -1 if an error occurred (errno is set). otherwise -1 and errno is set