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

Attribute forwarding and memory safety #8

Open
tkarabela opened this issue Oct 24, 2020 · 0 comments
Open

Attribute forwarding and memory safety #8

tkarabela opened this issue Oct 24, 2020 · 0 comments

Comments

@tkarabela
Copy link
Contributor

Follow-up on question from #6 on how to safely do attribute forwarding.

@eliemichel It is possible already to point the output at the same buffer as the input, for unchanged attributes, and in particular for connectivity information when the effect only is a modifier.

@tkarabela In terms of API, it might be a minor issue that by the time the output mesh is inputReleaseMesh()-ed, the mesh with the forwarded attribute may have already been inputReleaseMesh()-ed before, as order of releasing is undefined.

Presently, mesh releasing is done by the effect at end of cooking, one mesh at a time. We could simply say in the spec that if you are using attribute forwarding, you must not release the mesh you're forwarding from before releasing the mesh you're forwarding to.

In practice, a general rule of thumb "first release outputs, then inputs" should work fine, as long as you don't have multiple outputs forwarding between one another.

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