SDL_IOFromDynamicMem - Use this function to create an SDL_IOStream that is backed by dynamically
Contents
Availability
This function is available since SDL 3.2.0.
Description
This supports the following properties to provide access to the memory and control over allocations:
• SDL_PROP_IOSTREAM_DYNAMIC_MEMORY_POINTER: a pointer to the internal memory of the stream. This can be
set to NULL to transfer ownership of the memory to the application, which should free the memory with
SDL_free(). If this is done, the next operation on the stream must be SDL_CloseIO().
• SDL_PROP_IOSTREAM_DYNAMIC_CHUNKSIZE_NUMBER: memory will be allocated in multiples of this size,
defaulting to 1024.
Name
SDL_IOFromDynamicMem - Use this function to create an SDL_IOStream that is backed by dynamically
allocated memory.
Return Value
Returns a pointer to a new SDL_IOStream structure or NULL on failure; call SDL_GetError() for more
information.
See Also
SDL_CloseIO(3), SDL_ReadIO(3), SDL_SeekIO(3), SDL_TellIO(3), SDL_WriteIO(3) Simple Directmedia Layer SDL 3.2.20 SDL_IOFromDynamicMem(3)
Synopsis
#include<SDL3/SDL_iostream.h>SDL_IOStream*SDL_IOFromDynamicMem(void);
Thread Safety
It is safe to call this function from any thread.
