PYTHON : Cache memory management

Hi everybody.

I have a question regarding python in unreal.
I am testing the limits of a spawn actor tool from a json file and I using the “unreal.EditorLevelLibrary.spawn_actor_from_object” function in for loop to spawn my objects.
However I realized one thing, when I run my script for 1000 objects the ram loads at 32% and does not go down afterwards, if I run the script again at 1000 the ram remains at 32% it does not increase more but does not go down either, on the other hand if I go to 1500 or more it increases then stagnates until a new increase …
My question is do you know why? and is there a function in unreal or python to flush the cache?

I tried to reset my variables with “myVar = None” but it had no effect

Thank you in advance.