# Object Pool and Weak Pointers

**URL:** <https://forums.unrealengine.com/t/object-pool-and-weak-pointers/2495544>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine, question\
**Created:** [May 7, 2025, 2:56pm UTC](https://forums.unrealengine.com/t/object-pool-and-weak-pointers/2495544 "2025-05-07T14:56:06Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![fwannmacher](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@fwannmacher](https://forums.unrealengine.com/u/fwannmacher)\
**Post date:** [May 7, 2025, 2:56pm UTC](https://forums.unrealengine.com/t/object-pool-and-weak-pointers/2495544/1 "2025-05-07T14:56:06Z")

</div>

I’m implementing an Object Pool for my project but I’m having a hard time dealing with weak pointers as they will still valid even when the object is returned to its pool. For fixing that I was thinking about setting the `RF_Unreachable` flag in the `GUObjectArray` so the weak pointers would check and return `nullptr`.  
Is there a less hacky way of doing it?
