mirror of
https://github.com/esphome/esphome.git
synced 2026-07-11 01:15:33 +00:00
f3c175ab39
API protobuf messages are never deleted through base class pointers — they are always stack-allocated and passed by reference. The virtual destructor occupies 2 vtable slots (complete + deleting destructor) on 32-bit platforms using the Itanium ABI, costing 8 bytes per vtable. With 122 message classes, removing the virtual destructor saves ~976 bytes of flash. Each vtable shrinks from 24 bytes to 16 bytes.