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

Fixing release #7

Closed
tgolsson opened this issue Jul 5, 2019 · 0 comments
Closed

Fixing release #7

tgolsson opened this issue Jul 5, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@tgolsson
Copy link
Member

tgolsson commented Jul 5, 2019

@MaikKlein and I had a chat about release, and we sort of converged on the following:

  • Release should only ever be implemented for types where we know enough to safely release. That means we should only call it on the types which we can also instantiate, and thus know whether they have UserData.

  • Drop on Physics should be converted to unsafe .release()

  • Releases should if possible be (mut self) so we can enforce the invariants of release. Otherwise, it should be (&mut self) but safeguard against double deletes by removing the pointer.

  • All new and from_ptr and similar functions should be pub(crate) and not pub

@MaikKlein feel free to add more as you remember and feel

@MaikKlein MaikKlein self-assigned this Jul 5, 2019
@repi repi added the enhancement New feature or request label Jul 8, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants