Skip to content

[Question] Best way to dispose image rendered for 1 dynamically added effect #40

@Joshix-1

Description

@Joshix-1

I'm dynamically rendering an image and then show it as particle using ImageShape.
I'm adding it to the NewtonWIdget with the addEffect method on the state.

What would be the best way to dispose the image after the effect has finished?

The closest thing would be the ParticleConfiguration postEffectBuilder, but that would fail with more than 1 particle (which is common)

With onEffectStateChanged on the Newton it would be hard to know which images to dispose.

Maybe the Effect should have a dispose method that calls a user supplied callable or something similar.

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