two constructor copies question, again
Clint Laschkewitsch
clintl@us.ibm.com
Mon Nov 25 14:38:00 GMT 2002
On Jan 16, 2002 Rogeleio M Serrano Jr. asked why there were two copies of a
constructor being generated in the object file.
Alexandre Oliva responded that one was for full-object construction and one
was for sub-object construction.
Could you please clarify for me what you mean by sub-object? Is another
constructor needed if the first class is sub-classed? And if so, why?
What is the problem being solved?
I'm working in an embedded system environment where space is a premium. I
have several C++ classes which have a fair amount of logic in the
constructor and getting 2 copies of this code is a problem. Is there any
way to prevent getting two copies?
I assume the 2 destructors are for the same reason?
Thanks for the help.
Clint Laschkewitsch
More information about the Gcc
mailing list