[SDL] Why "SDL_iconv_string" use "malloc" without "free"
Torsten Giebl
wizard at syntheticsw.com
Wed Apr 30 06:05:51 PDT 2008
Hello !
> The API function "SDL_iconv_string" use a malloc as this:
> string = SDL_malloc(stringsize);
> This function is without a memory free operation and obviously cant do this because it returns the pointer malloced.
> So I think this maybe a small bug. Isnt it?
No, why ? This is a design question. It would be possible to
either return a new malloced string or to copy the new string into
an existing one. SDL chooeses most of the time the first variant,
also for SDL_Surfaces for example.
CU
More information about the SDL
mailing list