P
puzzlecracker
It is sort of open-ended question, thus pardon the clarity herein.
Let's say I have library (dll, .so, doesn't matter really), and I pass
it a pointer, to Foo (Foo *). How should that library know to clean up
after, what is the best design of this sort of a thing? I usually go
with two cases:
a) I pass it in a smart pointer
b) as a raw pointer
Let's say that b is mandatory, what should the strategy, or common
design be like?
Thanks
Let's say I have library (dll, .so, doesn't matter really), and I pass
it a pointer, to Foo (Foo *). How should that library know to clean up
after, what is the best design of this sort of a thing? I usually go
with two cases:
a) I pass it in a smart pointer
b) as a raw pointer
Let's say that b is mandatory, what should the strategy, or common
design be like?
Thanks