Skip to content

Attribute forwarding and memory safety #8

@tkarabela

Description

@tkarabela

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions