Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.c++ > #19092

Re: Non virtual and inheritance

From Juha Nieminen <nospam@thanks.invalid>
Newsgroups comp.lang.c++
Subject Re: Non virtual and inheritance
Date 2012-10-19 16:01 +0000
Organization Aioe.org NNTP Server
Message-ID <k5rtgl$72q$1@speranza.aioe.org> (permalink)
References <k5oqnl$slk$1@speranza.aioe.org> <pan.2012.10.18.12.29.32.390000@nowhere.com> <k5r756$cmd$1@speranza.aioe.org> <pan.2012.10.19.14.01.58.787000@nowhere.com>

Show all headers | View raw


Nobody <nobody@nowhere.com> wrote:
> If the vptr is a problem, it isn't usually due to the size, but to making
> the type non-POD.

It depends on the application, but it often is a question of size.
If you need to optimize the size of a class (usually because you need
to make millions of instantiations, and you need for them to be as fast
as possible and take as little memory as possible), even one additional
pointer may significantly increase memory usage.

I'd say the size issue is (at least in my experience) significantly
more prevalent than the non-POD issue.

Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread


Thread

Non virtual and inheritance Sensei <sensei_s_mail_is_at@me.com> - 2012-10-18 13:55 +0200
  Re: Non virtual and inheritance Nobody <nobody@nowhere.com> - 2012-10-18 13:29 +0100
    Re: Non virtual and inheritance Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 09:39 +0000
      Re: Non virtual and inheritance Nobody <nobody@nowhere.com> - 2012-10-19 15:01 +0100
        Re: Non virtual and inheritance Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 16:01 +0000
  Re: Non virtual and inheritance Rui Maciel <rui.maciel@gmail.com> - 2012-10-18 14:49 +0100
  Re: Non virtual and inheritance Luca Risolia <luca.risolia@studio.unibo.it> - 2012-10-18 20:06 +0200
  Re: Non virtual and inheritance Paavo Helde <myfirstname@osa.pri.ee> - 2012-10-18 14:40 -0500
  Re: Non virtual and inheritance Juha Nieminen <nospam@thanks.invalid> - 2012-10-19 09:41 +0000

csiph-web