sdlFreeRw function

void sdlFreeRw(
  1. Pointer<SdlRWops> area
)

Use this function to free an SDL_RWops structure allocated by SDL_AllocRW().

Applications do not need to use this function unless they are providing their own SDL_RWops implementation. If you just need a SDL_RWops to read/write a common data source, you should use the built-in implementations in SDL, like SDL_RWFromFile() or SDL_RWFromMem(), etc, and call the close method on those SDL_RWops pointers when you are done with them.

Only use SDL_FreeRW() on pointers returned by SDL_AllocRW(). The pointer is invalid as soon as this function returns. Any extra memory allocated during creation of the SDL_RWops is not freed by SDL_FreeRW(); the programmer must be responsible for managing that memory in their close method.

\param area the SDL_RWops structure to be freed

\since This function is available since SDL 2.0.0.

\sa SDL_AllocRW

extern DECLSPEC void SDLCALL SDL_FreeRW(SDL_RWops * area)

Implementation

void sdlFreeRw(Pointer<SdlRWops> area) {
  final sdlFreeRwLookupFunction = libSdl2.lookupFunction<
      Void Function(Pointer<SdlRWops> area),
      void Function(Pointer<SdlRWops> area)>('SDL_FreeRW');
  return sdlFreeRwLookupFunction(area);
}