diff --git a/libuavcan/include/uavcan/internal/lazy_constructor.hpp b/libuavcan/include/uavcan/internal/lazy_constructor.hpp index 25c3f8cbfe..7aeaa0f1bd 100644 --- a/libuavcan/include/uavcan/internal/lazy_constructor.hpp +++ b/libuavcan/include/uavcan/internal/lazy_constructor.hpp @@ -85,6 +85,7 @@ public: if (ptr_) ptr_->~T(); ptr_ = NULL; + std::fill(data_, data_ + sizeof(T), 0); } void construct()