Skip to content

How to solve the problem where memory is still occupied after the mesh is destroyed? #237

@jianghua1016

Description

@jianghua1016
const packedSplats = new PackedSplats({ url });
const splatMesh = new SplatMesh({
	packedSplats: packedSplats
});
    const packedSplats1 = new PackedSplats({ url1 });
const splatMesh1 = new SplatMesh({
	packedSplats: packedSplats1
});

I loaded multiple SplatMeshes using the code above. Now, I need to remove a certain SplatMesh. Normally, I can call packedSplats.dispose(); splatMesh.dispose();
But the current problem is that the memory usage does not decrease. It seems that the destruction operation should also be performed synchronously in the SparkRenderer. However, I tried to destroy several areas but the problem didn't get solved. The key point is that I only want to remove a certain SplatMesh rather than all of them. Could you please help me figure out how to destroy it in this situation? Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions