diff --git a/wpilibc/src/main/native/cpp/RobotBase.cpp b/wpilibc/src/main/native/cpp/RobotBase.cpp index da30c03612..17425bcaae 100644 --- a/wpilibc/src/main/native/cpp/RobotBase.cpp +++ b/wpilibc/src/main/native/cpp/RobotBase.cpp @@ -10,6 +10,7 @@ #include #include +#include #include #include @@ -117,4 +118,6 @@ RobotBase::RobotBase() : m_ds(DriverStation::GetInstance()) { RobotBase::RobotBase(RobotBase&&) : m_ds(DriverStation::GetInstance()) {} +RobotBase::~RobotBase() { cs::Shutdown(); } + RobotBase& RobotBase::operator=(RobotBase&&) { return *this; } diff --git a/wpilibc/src/main/native/include/frc/RobotBase.h b/wpilibc/src/main/native/include/frc/RobotBase.h index 45433f9e0e..eee07d66f7 100644 --- a/wpilibc/src/main/native/include/frc/RobotBase.h +++ b/wpilibc/src/main/native/include/frc/RobotBase.h @@ -127,7 +127,7 @@ class RobotBase { */ RobotBase(); - virtual ~RobotBase() = default; + virtual ~RobotBase(); // m_ds isn't moved in these because DriverStation is a singleton; every // instance of RobotBase has a reference to the same object.