# Adding some magazines to try in FPS game

**URL:** <https://forums.unrealengine.com/t/adding-some-magazines-to-try-in-fps-game/440017>\
**Category:** C++\
**Tags:** unreal-engine, CPP, question, pointers\
**Created:** [December 23, 2018, 4:39pm UTC](https://forums.unrealengine.com/t/adding-some-magazines-to-try-in-fps-game/440017 "2018-12-23T16:39:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ziad7](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@Ziad7](https://forums.unrealengine.com/u/Ziad7)\
**Post date:** [December 23, 2018, 4:39pm UTC](https://forums.unrealengine.com/t/adding-some-magazines-to-try-in-fps-game/440017/1 "2018-12-23T16:39:48Z")

</div>

Hello Everyone !  
  
I’m working on a FPS game  
  
and I have the following classes:  
  
Weapon, Magazine and the Character Classes.  
  
In Weapon class I’ve a pointer to the current used Magazine.  
  
In the Character class I’ve an TArray of pointers to the Magazines which the character has…  
  
so the question is how can I generate some magazines to try the ammo consume especially that garbage collector might cause pointer to some non-existing object…  
  
Thanks in advance
