私は仮想メソッドと vtables の概念を理解していると思いますが、オブジェクトをポインター (または参照) として渡すことと、値で渡すこと (どのような種類の vtable などを破棄するのか?) に違いがある理由がわかりません。
なぜこのようなものが機能するのですか:
Material* m = new Texture;
poly->setMaterial(m);
// methods from Texture are called if I keep carrying the pointer around
そして、これではありませんか?:
Material m = Texture();
poly->setMaterial(m);
// methods from Material are called if I pass the value around