I'm trying to free a bunch of things with different types, and so I think I might be able to free all of
them using one function by adding them to a pile of void * cells.
My question is: is it safe to save an SDL_Surface* as void * and use the free() function without the need of SDL_FreeSurface()?
No, you have to use
SDL_FreeSurface. (Evidence: what it does)Except in specific cases, it's never safe to just use one free function instead of another. You
freethings you allocate withmalloc. YouCloseHandlethings opened withCreateFile(on Windows). Youfclosefiles you opened withfopen. And so on.