I am writing a lib and a demo project. The project doesn't care which version of the lib I use (I can use sdl, directx or whatever I like as the gfx backend). To get the object I do
Obj *obj = libname_newDevice();
Now, should I use delete or should I do obj->deleteMe();
? I ask because I am not exactly doing new so I shouldn't be doing the delete?
-edit-
I have obj->create(theType); which returns a class with the Obj interface.
My real question is do i need a libname_deleteDevice(); or is obj->deleteMe() fine since i have a deleteMe in the interface?