I’d like to know how can I connect SDL_Surface* with shared_ptr?
I need to call SDL_FreeSurface(SDL_Surface*) before I delete SDL_Surface. How can I “modify deletion process” in shared_ptr?
I’d like to know how can I connect SDL_Surface* with shared_ptr? I need to
Share
Just pass SDL_FreeSurface to the constructor:
Just be sure you don’t do this with the pointer returned by
SDL_SetVideoModeorSDL_GetVideoSurface.