# Planar reflection capture node causes memory leak in game

**URL:** <https://forums.unrealengine.com/t/planar-reflection-capture-node-causes-memory-leak-in-game/401167>\
**Category:** C++\
**Tags:** planar-reflection, unreal-engine, memory, bug-report, UE4, question, CPP\
**Created:** [August 4, 2017, 6:39pm UTC](https://forums.unrealengine.com/t/planar-reflection-capture-node-causes-memory-leak-in-game/401167 "2017-08-04T18:39:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dsavine](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@dsavine](https://forums.unrealengine.com/u/dsavine)\
**Post date:** [August 4, 2017, 6:39pm UTC](https://forums.unrealengine.com/t/planar-reflection-capture-node-causes-memory-leak-in-game/401167/1 "2017-08-04T18:39:45Z")

</div>

When we have a planar reflection object in the level we get a big (1MB/s) memory leak in game. It starts when level is loaded but planar reflection itself is not seen. Memory leak happens after 1 minute waiting time. Also, when trying to use  
MALLOC\_LEAKDETECTION = 1 and MallocLeak Start/Stop we have an access violation in

void FMallocLeakDetection::Realloc(void\* OldPtr, void\* NewPtr, SIZE\_T Size)  
{   
if (bRecursive == false && (bCaptureAllocs || OpenPointers.Num()))  
{  
FScopeLock Lock(&AllocatedPointersCritical);

```
	// realloc may return the same pointer, if so skip this

	if (OldPtr != NewPtr)
	{
		FCallstackTrack* Callstack = OpenPointers.Find(OldPtr);

```

Any possible insights to this issues?

---

<div class="post-metadata">

**Author:** ![Vega\_Bai](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Vega\_Bai](https://forums.unrealengine.com/u/Vega_Bai)\
**Post date:** [February 4, 2018, 5:06am UTC](https://forums.unrealengine.com/t/planar-reflection-capture-node-causes-memory-leak-in-game/401167/2 "2018-02-04T05:06:54Z")

</div>

In version 4.16.3, still have memory leak, like 2-3M per sec…

---

<div class="post-metadata">

**Author:** ![HTPlatypus](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/htplatypus/32/676340_2.png) [@HTPlatypus](https://forums.unrealengine.com/u/HTPlatypus)\
**Post date:** [April 6, 2023, 12:29pm UTC](https://forums.unrealengine.com/t/planar-reflection-capture-node-causes-memory-leak-in-game/401167/3 "2023-04-06T12:29:12Z")

</div>

Did anyone ever solve this? It’s recently come back, reproduced in 5.1 and 5.2, but not in 4.27 ☹
