ros_best_practices icon indicating copy to clipboard operation
ros_best_practices copied to clipboard

Add example where virtual call is appropriate

Open tomlankhorst opened this issue 4 years ago • 0 comments

Sometimes virtual functions are costly, sometimes not. Show both examples in this repo.

As suggested in #23 by @peci1:

Virtual functions might be costly if the function is called often. Maybe the code could have a non-virtual function OftenCalledFunction and a virtual NotSoOftenCalledFunction. But that decision is on you.

tomlankhorst avatar Mar 30 '20 09:03 tomlankhorst