I am working in a class "A" that requires very high performance and am trying to work out the implications either way.
If I inherit this new class "B", the memory profile of "A" should increase by that much.
If I include just a ptr to "B" as a member variable in "A", then would I be correct in thinking that, as long as "B" is on the heap (ie new'd up) then "A" will remain as small as it is other than the new ptr reference. Is there something else that I haven't thought of?
It is preferable architecture wise for me to inherit "B", however it may be preferable performance wise to just stick with it as a member variable.