How do I properly wrap everything in my Cpp app using smart pointers?
I still can't understand how to wrap SDL C destruction functions.
https://eb2.co/blog/2014/04/c-14-and-sdl2-managing-resources/
>I still can't understand how to wrap SDL C destruction functions.
Here is the documentation and example code for using the smart pointer classes unique_ptr and shared_ptr in C++:
https://en.cppreference.com/w/cpp/memory/unique_ptr/unique_ptr.html
https://en.cppreference.com/w/cpp/memory/shared_ptr/shared_ptr.html
Specifically, this is the documentation for the constructors for these classes. You are going to want to reference the examples that use a custom deleter function. You should be able to just pass the function name for the SDL destructor in the same parameter you might use a lambda in.