Skip to content

Textures that are used as uniform variable value in a ShaderEffect don't get disposed with the ShaderEffect #867

Open
@RedImp1470

Description

@RedImp1470

FUSEE v0.13.0

Textures that are used in a ShaderEffect are kept alive by the TextureManager, even if the correpsonding ShaderEffect is already disposed.
Textures are registered in the TextureManager on creation. From then on, the TextureManager holds a reference to the Texture object.
But there is no connection from the ShaderEffect/EffectManager to the TextureManager. Therefore the TextureManager will keep the reference to the texture indefinitely.
A workaround is to manually delete the Texture when we know that the ShaderEffect is no longer needed. However, this isn't ideal or user-expected behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    • Status

      No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions