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

delete unused dispose #48

Closed
pixelzoom opened this issue Mar 5, 2016 · 1 comment
Closed

delete unused dispose #48

pixelzoom opened this issue Mar 5, 2016 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

Related to #30 (code review).

It looks like instances of RutherfordAtomNode and RSBaseModel exist for the lifetime of the sim, and their dispose functions are never exercised. If that's indeed the case, then recommend to delete code related to dispose, and simply add a comment that instances of these types exist for the lifetime of the sim.

In general:
• For common code, always implement dispose, unless you are implement something that can only exist for the lifetime of the sim.
• For sim-specific code, implement dispose only for types that don't exist for the lifetime of the sim. Otherwise you're writing code unnecessary code that's never exercised and therefore never tested.

@pixelzoom
Copy link
Contributor Author

👍 Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants