# How to force memory free in 'Commandlet'

**URL:** <https://forums.unrealengine.com/t/how-to-force-memory-free-in-commandlet/1156766>\
**Category:** C++\
**Tags:** commandlet, unreal-engine, question, CPP\
**Created:** [May 6, 2023, 5:06pm UTC](https://forums.unrealengine.com/t/how-to-force-memory-free-in-commandlet/1156766 "2023-05-06T17:06:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ayake](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ayake](https://forums.unrealengine.com/u/Ayake)\
**Post date:** [May 6, 2023, 5:06pm UTC](https://forums.unrealengine.com/t/how-to-force-memory-free-in-commandlet/1156766/1 "2023-05-06T17:06:34Z")

</div>

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

```c++
GEngine->ForceGarbageCollection(true);
GEngine->ConditionalCollectGarbage();

```

and

```c++
MarkPendingKill();

```

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