# C++ TSet\<\> unable to read memory

**URL:** <https://forums.unrealengine.com/t/c-tset-unable-to-read-memory/470295>\
**Category:** C++\
**Tags:** corrupted-project, container, unreal-engine, question, CPP\
**Created:** [August 25, 2020, 1:23pm UTC](https://forums.unrealengine.com/t/c-tset-unable-to-read-memory/470295 "2020-08-25T13:23:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghfjy787](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@ghfjy787](https://forums.unrealengine.com/u/ghfjy787)\
**Post date:** [August 25, 2020, 1:23pm UTC](https://forums.unrealengine.com/t/c-tset-unable-to-read-memory/470295/1 "2020-08-25T13:23:44Z")

</div>

Hi, I’m trying to loop a TSet\<\> and accessing each pointer only if is valid but sometimes the if statement returns true (which means is valid) but crashes when accessing it with like if its corrupted.  
I check in debug mode and they are not actually invalid but they seem corrupted in memory??

![](https://d3kjluh73b9h9o.cloudfront.net/original/4X/7/d/c/7dc2f721d5409099e02b4acbe857e0d71b22355f.png)
