# How can I understand the data member 'Outer' in the UObjectBase class

**URL:** <https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196>\
**Category:** C++\
**Tags:** unreal-engine, UE4, question, CPP\
**Created:** [August 28, 2015, 2:02pm UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196 "2015-08-28T14:02:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_ec4e83c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ec4e83c9](https://forums.unrealengine.com/u/anonymous_user_ec4e83c9)\
**Post date:** [August 28, 2015, 2:02pm UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/1 "2015-08-28T14:02:52Z")

</div>

Hello everyone,my question is simple,but confuse me very long.I always don’t konw the clear mean about the Outer member in the UObjectBase class.  
In my view, if a member in class A named ‘m’ which is derived from UObject,so,I think the outer class of ‘m’ is A.  
Is my understanding all right?  
Can anybody tell me a exactly answer?  
Thanks very much!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1690214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1690214](https://forums.unrealengine.com/u/anonymous_user_e1690214)\
**Post date:** [August 28, 2015, 2:17pm UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/2 "2015-08-28T14:17:26Z")

</div>

An object’s “Outer” is the object which “owns” it. For instance, a Component is owned by its Actor or parent component, and Actors are owned by their Levels. Whenever you construct an object of a class derived from UObject, you provide it with an Outer. (CreateDefaultSubobject implicitly provides the current object as the Outer.)

Sometimes an object will have a pointer to some other object without owning that object. For instance, UNavMovementComponent has a pointer to its sibling UPathFollowingComponent. In that case, the UPathFollowingComponent will not have UNavMovementComponent as its Outer.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ec4e83c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ec4e83c9](https://forums.unrealengine.com/u/anonymous_user_ec4e83c9)\
**Post date:** [August 29, 2015, 12:36am UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/3 "2015-08-29T00:36:28Z")

</div>

Thanks !  
You say An object’s “Outer” is the object which “owns” it. Can I understand the “owns” means relationship of the gameplay classes?  
In the UE4 gameplay programing frame,I know actor is a container of component, Levels can have many actors,Map can have many levels. So,can I get to understand level’s outer is map?  
Thanks!

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e1690214](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e1690214](https://forums.unrealengine.com/u/anonymous_user_e1690214)\
**Post date:** [August 29, 2015, 9:04am UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/4 "2015-08-29T09:04:50Z")

</div>

Generally it has that relationship, but not always. A ULevel’s outer is a UWorld (basically a map). But a child actor’s Outer is the Level, not the owning UChildActorComponent.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_ec4e83c9](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_ec4e83c9](https://forums.unrealengine.com/u/anonymous_user_ec4e83c9)\
**Post date:** [August 29, 2015, 1:04pm UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/5 "2015-08-29T13:04:27Z")

</div>

Thanks very much for resolving my question.

---

<div class="post-metadata">

**Author:** ![njukakaxi](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@njukakaxi](https://forums.unrealengine.com/u/njukakaxi)\
**Post date:** [July 16, 2018, 8:22am UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/6 "2018-07-16T08:22:57Z")

</div>

if I destroy an actor, which is the outer of a component, the component will also be destroyed?

---

<div class="post-metadata">

**Author:** ![nutellis](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@nutellis](https://forums.unrealengine.com/u/nutellis)\
**Post date:** [September 25, 2018, 4:43pm UTC](https://forums.unrealengine.com/t/how-can-i-understand-the-data-member-outer-in-the-uobjectbase-class/330196/7 "2018-09-25T16:43:23Z")

</div>

I believe it will be left without a parent so it will be garbage collected on the next iteration of the GC
