# How to manually destroy a UObject?

**URL:** <https://forums.unrealengine.com/t/how-to-manually-destroy-a-uobject/384325>\
**Category:** Community & Industry Discussion\
**Tags:** delete, object, timer, unreal-engine, question\
**Created:** [February 8, 2017, 8:07pm UTC](https://forums.unrealengine.com/t/how-to-manually-destroy-a-uobject/384325 "2017-02-08T20:07:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_1ed1c3df](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_1ed1c3df](https://forums.unrealengine.com/u/anonymous_user_1ed1c3df)\
**Post date:** [February 8, 2017, 8:07pm UTC](https://forums.unrealengine.com/t/how-to-manually-destroy-a-uobject/384325/1 "2017-02-08T20:07:41Z")

</div>

I have a UObject class I’m using as a buff object with its own ticking functionality and etc. When a player overlaps with a pickup, its constructs the corresponding buff object and puts the reference in the player’s arraylist of active buffs. It has a Destroy event which is called when it life span has been reached or some other outside force interacts with it. So far the Destroy event only removes it from its owning arraylist but doesn’t destroy it because the timer is still ticking. How do I delete this object completely or mark it for delete if I must wait for GC to do whatever?

---

<div class="post-metadata">

**Author:** ![nande](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/nande/32/1057698_2.png) [@nande](https://forums.unrealengine.com/u/nande)\
**Post date:** [September 17, 2024, 10:41pm UTC](https://forums.unrealengine.com/t/how-to-manually-destroy-a-uobject/384325/2 "2024-09-17T22:41:50Z")

</div>

i had the same question.  
apparently the best available is to wait or force the GC. or force call BeginDestroy. neither are good enough for me.

> [@How do I manually delete uobjectd objects created by Construct Object from Class?](https://forums.unrealengine.com/t/how-do-i-manually-delete-uobjectd-objects-created-by-construct-object-from-class/690124/2):
>
> The easiest way to delete objects is to simply set all references to the object to “None” (null.) The Unreal garbage collector will take care of the rest. If you positively need to “destroy” the object right now, AND you know there are no other references to it, you can call ConditionalBeginDestroy(), but it’s really neither necessary nor usually a good idea. Edit: If your object is an AActor there is also AActor::Destroy() to start the shut-down of the object, and send its destruction on the…

> [@Explicitely Delete a UObject](https://forums.unrealengine.com/t/explicitely-delete-a-uobject/316744/2):
>
> Hello, UObjects are managed by the garbage collector. To create a UObject appropriately, use NewObject(), NewNamedObject() and ConstructObject(). It is possible to configure the way UObjects will be handled by garbage collector at the time of creation with Object Flags enumeration. (If you like to learn more about UObject Instance Creation, you can go here: [Creating Objects in Unreal Engine | Unreal Engine 5.1 Documentation](https://docs.unrealengine.com/latest/INT/Programming/UnrealArchitecture/Objects/Creation/index.html) ) This way, you should not call new or delete on UObjects. If UObject…
