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

Object parameters should always be pointers? #7

Open
malcolmstill opened this issue May 6, 2020 · 0 comments
Open

Object parameters should always be pointers? #7

malcolmstill opened this issue May 6, 2020 · 0 comments

Comments

@malcolmstill
Copy link
Owner

Description

The dispatch functions that take Object structs seem to actually get pointers to those Objects, which means the memory can change out from under us if we call register (which may reallocate where the Objects are stored and clobber existing memory).

This issue is not about data getting clobbered (because we should no longer call register mid dispatch function). Rather this is to make it obvious that we can write to the actual Object memory store (it might be that it's not possible to write to the Object if it is not a pointer, only that it's memory can change, in which case the pointer allows us the benefit of being able to update without calling get(id)

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

No branches or pull requests

1 participant