I’ve been profiling this ue4 plugin that has its custom uobject, this custom uobject stores a number of static meshes and has its contents rendered into a preview thumbnail, whenever the editor asks it to proper thumbnail behaviour, we used the classes related to rendering static meshes on the engine as a base, and everything goes fine until I notice there are huge allocations in memory that only continue to go up as I interact with more of these uobjects.
I’ve already checked for leaks using MallocLeak, also made sure that every single actor was being destroyed properly and tried forcing garbage collection on the preview world, without any kind of reduction in memory. I’ve come to believe that this is not a memory leak, as unreal could be caching/pooling these meshes and materials somewhere else in memory for later reuse, if this is correct, is there any way to actually “flush” or reset preview worlds? I really want to bring memory usage back down to 2 gb or so. 8 is just too much. Or have I derived from the wrong classes? (FPreviewScene and UDefaultSizedThumbnailRenderer)