# Disable Garbage collection

**URL:** <https://forums.unrealengine.com/t/disable-garbage-collection/440554>\
**Category:** Mobile\
**Tags:** garbage-collector, disable, shipping-build, unreal-engine, iOS, UE4, question\
**Created:** [January 3, 2019, 7:13pm UTC](https://forums.unrealengine.com/t/disable-garbage-collection/440554 "2019-01-03T19:13:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![glory13](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@glory13](https://forums.unrealengine.com/u/glory13)\
**Post date:** [January 3, 2019, 7:13pm UTC](https://forums.unrealengine.com/t/disable-garbage-collection/440554/1 "2019-01-03T19:13:01Z")

</div>

I am getting some fairly random crashes in my game in an iOS Shipping Build. None of these crashes seem to happen in any other build. I suspect that some of my objects are getting garbage collected when they should not be.

In order to test this theory, I would like to disable garbage collection.

How can I disable garbage collection for my iOS Shipping Build?

Note: putting addToRoot on all the objects in my game is not an option.
