[wpilibc] Fixed memory leak during initialization
ADIS16448_IMU.cpp allocated memory for DigitalOutput and DigitalInput objects without properly releasing or saving them.
Idk if deleting the DigitalInput afterwards actually works because that may unconfigure the pin.
Should I just make it identical by adding m_status_led and m_reset_in to the ADIS classes?
The destruction operator overload and close override are identical
Sure, but does this PR actually work on real hardware?
Not tested yet
In reference to https://github.com/wpilibsuite/allwpilib/issues/3985#issue-1122270795
/azp run
Azure Pipelines successfully started running 1 pipeline(s).
Like I said before, this PR needs to be tested on real hardware since it's messing with hardware configuration. I don't have access to said hardware.
If there's some minimal code to test this, I might be able to run it on hardware.
This doesn't really need a hardware test, it's only modifying destructor behavior to clean up resources. The deletions do need to be moved to Close() for consistency with the other cleanup code.
Just moved them to Close() for consistency.
/wpiformat
To retrigger the builds, please rebase. Thanks and sorry for the inconvenience (we've since fixed the action automation so this doesn't happen in the future).