Un-freed memory when creating assets (Mesh merging, duplication, importing, etc)

Hello,

I’m doing work on an automated system using Python scripting that relies on merging lots of meshes in the editor. When doing this, the memory usage balloons very quickly and, even after doing a full save after each merge (level and all ‘dirty’ assets), the memory does not get freed.

I originally thought this may be an issue with Python or mesh-merging, but after doing some testing directly in the Editor, I found that asset generation of ANY kind will incur a memory cost that stays even after they’re written to disk and a garbage collection cycle is forced. The only way I can find to clear this memory is to close and re-open the editor entirely, which, for the particular script I’m working on would be very cumbersome and would require a lot of effort to work around.

I have searched for others discussion topics with similar issues but they have mostly gone unanswered.

Is it possible to clear this memory while the editor is open? Or is this just a nasty bug?

EDIT: I’ve confirmed this is happening in UE 5.0.1 as well.