
8 Mar
2010
8 Mar
'10
3:20 p.m.
2010/3/8 David
Nothing stands out to me. Polymorphic.... hmm... I don't do anything of the sort in my example. Doesn't really explain why the warning is there does it.
What if someone implemented a class that inherits Game and serialized that to an archive? When reading shared_ptr<Game> from such an archive, serialization library does no know in advance which type should be used to create an object, hence the need for a type to be polymorphic. Adding a virtual function (e.g. destructor) fixes the problem for you? Roman Perepelitsa.