How to force memory free in 'Commandlet'

My project need use datasmith Commandlet import files.Now I’m having a problem where the memory fills when I import too many files.
I’ve tried using

GEngine->ForceGarbageCollection(true);
GEngine->ConditionalCollectGarbage();

and

MarkPendingKill();

but not useful
I need help ,I want to know how to free up memory.
thanks.