# Reference to self causes warning when deleting

**URL:** <https://forums.unrealengine.com/t/reference-to-self-causes-warning-when-deleting/410882>\
**Category:** Blueprint\
**Tags:** bug, unreal-engine, question\
**Created:** [November 29, 2017, 12:29pm UTC](https://forums.unrealengine.com/t/reference-to-self-causes-warning-when-deleting/410882 "2017-11-29T12:29:08Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Napoleonite](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Napoleonite](https://forums.unrealengine.com/u/Napoleonite)\
**Post date:** [November 29, 2017, 12:29pm UTC](https://forums.unrealengine.com/t/reference-to-self-causes-warning-when-deleting/410882/1 "2017-11-29T12:29:08Z")

</div>

Actors with a reference to self will cause this warning when deleting it in the editor:

![221804-selfref.png](https://d3kjluh73b9h9o.cloudfront.net/original/4X/c/8/2/c82115b0fda29604f8f807953008eb71b23e0827.png)

It says “is referenced by other Actors/Objects” but it is not. It is referenced by itself. Also throwing a warning for this makes no sense or at least should be possibly to disable. There is currently no UPROPERTY setting to disable this I believe.

```
// header
 UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Turret01|IDamageable")
 FTargetInfo TargetInfo;

// cpp
 ATurret01::ATurret01()
 {
   TargetInfo = FTargetInfo(this, 1, true); // note the "this" keyword.
 }

```

For more info see: [Okay to use "this" keyword in constructor/header? - C++ - Unreal Engine Forums](https://answers.unrealengine.com/questions/730370/okay-to-use-this-keyword-in-constructor.html)

If the code allows it, the workaround would be to initialize self-references in the BeginPlay() instead of in the constructor. But that is not always desireable.

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_b666e59e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_b666e59e](https://forums.unrealengine.com/u/anonymous_user_b666e59e)\
**Post date:** [April 3, 2018, 4:41pm UTC](https://forums.unrealengine.com/t/reference-to-self-causes-warning-when-deleting/410882/2 "2018-04-03T16:41:04Z")

</div>

Hi Napoleonite,

Sorry for the delay in responding to your post. I ran some tests and was able to reproduce what you described. I have entered [UE-57200](https://issues.unrealengine.com/issue/UE-57200) to have this investigated further.
