Re: Unexpected C++ program result

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





klperez wrote:
> 
> Hello Mattia, I am glad your question was sort of answered. Given his
> answer it seems to me that gcc breaks the rules of polymorphism, because
> it does not allow multiple inherited objects to be treated like their base
> class. Clearly one should not have Final objects be stored in a
> dynamically allocated array of base classes, but is there a way to store
> them in a different way without leaking memory? For example could one use
> a std vector, which stores three Final objects, and then calls clear when
> it comes time to delete them?
> 
> Sorry for hijacking your question, and I hope that someone is able to
> answer.
> 
> Kevin
> 

-- 
View this message in context: http://old.nabble.com/Unexpected-C%2B%2B-program-result-tp33280210p33763653.html
Sent from the gcc - Help mailing list archive at Nabble.com.



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux