Destroy a buffer and frees associated resources
#include <screen/screen.h>
int screen_destroy_buffer(screen_buffer_t buf)
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.
0 if successful, or -1 if an error occurred (errno is set; refer to errno.h for more details).