So this is more of a general question at this point, I don’t have code written yet.
But when you are writing code for DLLs in C++, is the burden of memory management on the DLL or on the user ? My initial thought was to have a “factory” c-wrapper function that would be called to instantiate my object , and then there would be other wrapper functions acting as getters and setters. And finally there would be a destructor function the user could call. I’m trying to structure it to avoid memory management issues.
But is this bad practice ? Is it common practice to not use classes in DLLs to avoid this issue ? If anyone could point me in the right direction I would greatly appreciate it. Thanks.
I have outlined my approach but it seems wrong to me, so I came here to see what the accepted practices are.