Scroll to navigation

SDL_RWclose(3) SDL3 FUNCTIONS SDL_RWclose(3)

NAME

SDL_RWclose - Close and free an allocated SDL_RWops
structure.

SYNOPSIS

#include "SDL3/SDL.h"
int SDL_RWclose(SDL_RWops *context);

DESCRIPTION

SDL_RWclose () closes and cleans up the

SDL_RWops
stream. It releases any resources used by the stream and frees the SDL_RWops
itself with

SDL_DestroyRW (). 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_RWops
is still invalid once this function returns.

FUNCTION PARAMETERS

SDL_RWops
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_RWFromConstMem(3), SDL_RWFromFile(3), SDL_RWFromMem(3), SDL_RWread(3), SDL_RWseek(3), SDL_RWwrite(3)

SDL 3.0.0 SDL