SDL_FreeSurface() - freeing surfaces

Hi folks,

Is there someone to tell me if tis necessary to free(ptr) a SDL_Surface* ptr
if a SDL_FreeSurface(ptr) has been done?

Thanks in advance,

wwp

No, there isn’t anyone specific assigned to it, but this gets asked enough
that maybe we should get someone?

SDL/src/video/surface.c, line 715 …

void SDL_FreeSurface (SDL_Surface *surface)
{

free(surface);
#ifdef CHECK_LEAKS
–surfaces_allocated;
#endif
}On Mon, Jan 22, 2001 at 12:20:11PM +0100, wwp wrote:

Hi folks,

Is there someone to tell me if tis necessary to free(ptr) a SDL_Surface* ptr
if a SDL_FreeSurface(ptr) has been done?

Thanks in advance,

wwp


Matt Busigin mbusigin (at) amber.org.uk
Control Systems Programmer

Is there someone to tell me if tis necessary to free(ptr) a SDL_Surface* ptr
if a SDL_FreeSurface(ptr) has been done?

you must not call free(), always call SDL_FreeSurface()