# Garbage collection: freezes

**URL:** <https://forums.unrealengine.com/t/garbage-collection-freezes/306608>\
**Category:** Programming & Scripting\
**Tags:** unreal-engine\
**Created:** [February 11, 2015, 1:37am UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608 "2015-02-11T01:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![anonymous\_user\_945031d2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_945031d2](https://forums.unrealengine.com/u/anonymous_user_945031d2)\
**Post date:** [February 11, 2015, 1:37am UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608/1 "2015-02-11T01:37:30Z")

</div>

I have UMG widget with a lot of other widgets inside. Sometimes I’m creating it and after that, when garbage collection happening, game freezing. Right on the tick by every minute of a game.

I wounder: why garbage collecting actually freezing game? I thought it’s something that works in background. Why all thread should wait while garbage will be collected?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [February 11, 2015, 8:15pm UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608/2 "2015-02-11T20:15:04Z")

</div>

Hello ,

I was unable to reproduce this issue on my end. I have a few questions for you that will help narrow down what issue it is that you are experiencing.

Quick questions:

1. What version of the engine are you using?
2. Can you reproduce this in a clean project?
3. If so, can you please provide a detailed list of steps to reproduce this issue?
4. Can you tell me at what points exactly your game is freezing?
5. Do you have any loops inside your widgets?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_945031d2](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_945031d2](https://forums.unrealengine.com/u/anonymous_user_945031d2)\
**Post date:** [February 24, 2015, 1:03am UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608/3 "2015-02-24T01:03:48Z")

</div>

Hi ,

Sorry, I didn’t mentioned that I’m not only creating but removing widget too. It have a lot of inner widgets. And everyone have a pointer to main UserWidget and parents. Maybe it’s about some sort of cycle-reference?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [March 4, 2015, 6:19pm UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608/4 "2015-03-04T18:19:59Z")

</div>

Hello ,

I am still unable to reproduce this issue. Could you post a reply with the answers to the questions asked in my first post?

---

<div class="post-metadata">

**Author:** ![anonymous\_user\_e729f54e](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@anonymous\_user\_e729f54e](https://forums.unrealengine.com/u/anonymous_user_e729f54e)\
**Post date:** [March 12, 2015, 7:34pm UTC](https://forums.unrealengine.com/t/garbage-collection-freezes/306608/5 "2015-03-12T19:34:35Z")

</div>

Hello ,

We have not heard back from you in a few days, so we are marking this post as Resolved for tracking purposes. If you are still experiencing the issue you reported, please respond to this message with additional information and we will offer further assistance.

Thank you.
