JHS-Viking-Robotics / FRC-2022

Code for the 2022 FRC season, now written in Java
Other
2 stars 2 forks source link

Check the use of new keyword and memory management project-wide #37

Closed derickson2402 closed 2 years ago

derickson2402 commented 2 years ago

Many examples online use the new keyword when using different parts of the WPILib or CTRE library, but I don't know that this is necessarily what is desired in every situation. For instance, for the Drivetrain velocity controlled driving, a new ChassisSpeeds class doesn't necessarily need to be created every control loop.

It would be good to go through and check out all of the uses of new throughout the project.

derickson2402 commented 2 years ago

Closing this issue because I forgot that new is different in Java vs C++. Check out this article for more.