World's most popular travel blog for travel bloggers.

Ques : Limitations of Virtual Functions

, , No Comments

 1. The function call takes slightly longer due to the virtual mechanism, and it also makes it more difficult for the compiler to optimize because it doesn't know exactly which function is going to be called at compile time. 

2. In a complex system, virtual functions can make it a little more difficult to figure out where a function is being called from. 

3. Virtual functions will usually not be inlined. 

4. Size of object increases due to virtual pointer.

0 comments:

Post a Comment

Let us know your responses and feedback