sdlCloseStorage function

bool sdlCloseStorage(
  1. Pointer<SdlStorage> storage
)

Closes and frees a storage container.

\param storage a storage container to close. \returns true if the container was freed with no errors, false otherwise; call SDL_GetError() for more information. Even if the function returns an error, the container data will be freed; the error is only for informational purposes.

\since This function is available since SDL 3.1.3.

\sa SDL_OpenFileStorage \sa SDL_OpenStorage \sa SDL_OpenTitleStorage \sa SDL_OpenUserStorage

extern SDL_DECLSPEC bool SDLCALL SDL_CloseStorage(SDL_Storage *storage)

Implementation

bool sdlCloseStorage(Pointer<SdlStorage> storage) {
  final sdlCloseStorageLookupFunction = libSdl3.lookupFunction<
      Uint8 Function(Pointer<SdlStorage> storage),
      int Function(Pointer<SdlStorage> storage)>('SDL_CloseStorage');
  return sdlCloseStorageLookupFunction(storage) == 1;
}