sdlGetNumAllocations function

int sdlGetNumAllocations()

Get the number of outstanding (unfreed) allocations.

\returns the number of allocations or -1 if allocation counting is disabled.

\threadsafety It is safe to call this function from any thread.

\since This function is available since SDL 3.2.0.

extern SDL_DECLSPEC int SDLCALL SDL_GetNumAllocations(void)

Implementation

int sdlGetNumAllocations() {
  final sdlGetNumAllocationsLookupFunction = libSdl3
      .lookupFunction<Int32 Function(), int Function()>(
        'SDL_GetNumAllocations',
      );
  return sdlGetNumAllocationsLookupFunction();
}