Allocate dynamic memory for an SDL event.
Defined in <SDL3/SDL_events.h>
size | the amount of memory to allocate |
Returns a pointer to the memory allocated or NULL on failure; call SDL_GetError() for more information.
You can use this to allocate memory for user events that will be automatically freed after the event is processed.
It is safe to call this function from any thread.
This function is available since SDL 3.0.0.