Quote:
Originally posted by Zaei
virtual functions cause one extra dereference per call, to get the function from the vtable, which adds 4 bytes per virtual function to the total class size. Non-virtual members add no overhead, and no extra size to the class. You cant actually be comparing that to Java >=(.
Z.
you're right, but I can compare VB with Java, think about garbage collection ;) Think about VB.NET, a form with no controls on it and no code uses 10M ram compiled in release mode, and VB.NET is taking a lot more advantage of OOP than VB6, but the abstraction provided by STL is still overwhelming, think about doing that with OOP polymorphism, that would bloat all containers, make iterators useless and slow down functors with the virtual calls instead of inlining them.