Skip to content

Instantly share code, notes, and snippets.

@lethal-guitar
Created October 27, 2017 15:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lethal-guitar/e854f18e9a85dc5a9b077c6dcc5da812 to your computer and use it in GitHub Desktop.
Save lethal-guitar/e854f18e9a85dc5a9b077c6dcc5da812 to your computer and use it in GitHub Desktop.
template<>
struct Deleter<SDL_Window> {
void operator()(SDL_Window* ptr) {
SDL_DestroyWindow(ptr);
}
};
template<>
struct Deleter<SDL_Renderer> {
void operator()(SDL_Renderer* ptr) {
SDL_DestroyRenderer(ptr);
}
};
template<>
struct Deleter<SDL_Texture> {
void operator()(SDL_Texture* ptr) {
SDL_DestroyTexture(ptr);
}
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment