I'm pretty new in C
and would like to ask a question about copying behavior. I'm reading Scott Meyers
' C++ and he said in the book that C++
may be considered as a composition of languages and we should distinguish the so called C part from the C++
part. Now if we have to use some native C
API containing the following:
FontHandle getFont(); //From, C API
void releaseFont(FontHandle fh); //From the same C API
As far as I know, the C
language doesn't allow defining a custom copying behavior via copy-custructors. So, what should I expect to happen if I write the following:
FontHandle f1 = getFont();
FontHandle f2 = f1; //What's going to happen here? Deep or shallow copy?