std::shared_ptr<SDL_Surface> shared_surf(SDL_LoadBMP("foo.bmp"),SDL_FreeSurface);
请确保不要使用SDL_SetVideoMode或SDL_GetVideoSurface返回的指针执行此操作.