Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unit tests and memory safety #765

Merged
merged 6 commits into from
Oct 8, 2024
Merged

Unit tests and memory safety #765

merged 6 commits into from
Oct 8, 2024

Conversation

mairas
Copy link
Collaborator

@mairas mairas commented Oct 8, 2024

At long last, I have implemented few rudimentary unit tests for SensESP. Not great, but at least it will be easier to add new ones in the future.

Also at long last, I have taken some steps to improve memory safety on SensESP. The codebase has been quite nonchalant about creating objects on the heap and not properly tracking them. This hasn't been an issue as long as the enclosing objects haven't been destroyed, but it's not a good practice, and with unit testing, it should be expected that the whole SensESP app will be torn down. I have now wrapped many internal heap objects in shared_ptr or unique_ptr and also added some destructors for select classes.

@mairas mairas merged commit 408d9cf into main Oct 8, 2024
13 checks passed
@mairas mairas deleted the unit_tests branch October 8, 2024 09:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant