Scroll to navigation

SDL_CloseIO(3) SDL3 FUNCTIONS SDL_CloseIO(3)

NAME

SDL_CloseIO - Close and free an allocated SDL_IOStream
structure.

SYNOPSIS

#include "SDL3/SDL.h"
int SDL_CloseIO(SDL_IOStream *context);

DESCRIPTION

SDL_CloseIO () closes and cleans up the

SDL_IOStream
stream. It releases any resources used by the stream and frees the SDL_IOStream
itself. This returns 0 on success, or -1 if the stream failed to flush to its output (e.g. to disk).

Note that if this fails to flush the stream to disk, this function reports an error, but the SDL_IOStream
is still invalid once this function returns.

FUNCTION PARAMETERS

SDL_IOStream
structure to close

RETURN VALUE

Returns 0 on success or a negative error code on failure; call

SDL_GetError () for more information.

AVAILABILITY

This function is available since SDL 3.0.0.

SEE ALSO

SDL_OpenIO(3)

SDL 3.1.0 SDL