Replacing a gameobject's mesh on runtime without duplicating the mesh

Hi,
I’m trying to have some of my game objects’ meshes replaced on runtime in order to create some kind of animation (without using skeletons or other methods).
Let’s say for example that I have 10 game objects, each of the has a different mesh for each frame in their animation.
When I initialize my game I’m loading all of the meshes into a data class that holds all the meshes in a List and when I update the game objects I wanna do something like
MeshFilter filter = gameObject.GetComponent();
filter.mesh = nextMesh;
The problem with this use case is that the 2nd line doesn’t use the store mesh as a reference but instead it would make a new copy of the nextMesh so if I run it in a loop the memory usage will just explode.
I’m relatively new to Unity so I’m still learning the Unity way of doing things, I come from C++ and used to passing Mesh objects by pointer of reference although I’m pretty sure that in C# such an assignment is supposed to work “by reference” and not “by value”.

So what would be the right way to achieve this?

P.S I know that replacing meshes on a frame by frame basis sounds wasteful and isn’t the right way to animate something in a game. my use case here is a bit different so it has to work like this.

Thanks.

I’ve never tried to do something like this, but can you just make 10 gameobjects, each with a different mesh on it, and enable/disable them every frame in sequence (or activate/deactivate their render components, whichever is faster)?

I thought about this option but wanted to avoid creating all the gameobject and replacing them because the material remains the same except for textures that are being replaced.
Anyone else tried this?
Why does it even create a new copy when I do filter.mesh = nextMesh;?

filter.sharedMesh = nextMesh.

I actually tried this, same effect

Hmm, I thought an active ref to nextMesh would hold onto that and you wouldn’t add any mem after the first time.

We do our mesh flipbooks by pooling a bunch of objects offscreen and moving them into place as needed. This is even faster than .SetActive-ing a bunch of separate game objects.

Wouldn’t it be wasteful to have 6000 un-active game objects inside the scene?