I’ve these plain C functions from a library:
struct SAlloc;
SAlloc *new_salloc();
void free_salloc(SAlloc *s);
Is there any way I can wrap this in C++ to a smart pointer (std::unique_ptr), or otherwise a RAII wrapper ?
I’m mainly curious about the possibilities of the standard library without creating my own wrapper/class.
Yes, you can reuse unique_ptr for this. Just make a custom deleter.