Send a request to Screen to destroy the buffers of the specified stream


#include <screen/screen.h>
int screen_destroy_stream_buffers(screen_stream_t stream)


The handle of the stream whose buffers you want to destroy.




Function Type: Flushing Execution

This function releases the buffers that were allocated for a stream, without destroying the local object handle. If the buffers were created with screen_create_stream_buffers(), the memory is released and can be used for other stream, window or pixmap buffers. If the buffers were attached using screen_attach_stream_buffers(), the buffers are destroyed but no memory is actually released. In this case the application is responsible for freeing the memory after calling screen_destroy_stream_buffers(). Once the stream buffers have been destroyed, you can change the format, the usage, and the buffer size before creating new buffers again. The memory that is released by this call is not reserved and can be used for any subsequent buffer allocation by Screen. After calling screen_destroy_stream_buffers(), the object no longer exists in Screen. Only the local handle remains.


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