w*********t 发帖数: 319 | 1 Could you tell me any situation not to use virtual destructor? Usually I use
virtual destructor in derived classes.
This might related embedded C++ software.
Thanks. | P*****f 发帖数: 2272 | 2 In emdedded environment, the resource is quite limited, e.g., the memory.
Make a virtual dtor will add a ptr to vtbl in each class instance. This
comsumes lots of memory if there are thousands of instances.
【在 w*********t 的大作中提到】 : Could you tell me any situation not to use virtual destructor? Usually I use : virtual destructor in derived classes. : This might related embedded C++ software. : Thanks.
|
|