title: What can cause "Message from debugger: Terminated due to memory issue"
body: <p>My app is sometimes crashing and the console says</p>
  
  <p><code>Message from debugger: Terminated due to memory issue</code></p>
  
  <p>Has anyone else experienced this and know some of what can cause this?  Here is what I have tried so far.</p>
  
  <ol>
  <li>I have enabled Zombie Objects and it does not find anything.</li>
  <li>This only happens on my iPhone and so I can't run the other Memory Management tools that only run on the simulator (ie Guard Malloc).</li>
  <li>This only happens after a low memory warning.  It doesn't happen after every memory warning, just after some memory warnings.  When my app receives a memory warning, it clears out a number of caches and so my guess is that it is related to this.</li>
  <li>In the simulator I simulated memory warnings and this never happened.</li>
  <li>I thought that it might be related to a weak object so I added a symbolic break point on <code>objc_weak_error</code>.  I did get the debugger to stop one this break point once and I fixed the weak error, but it did not fix the "Terminated due to memory issue".</li>
  <li>I though that maybe I wasn't freeing up enough memory, so I watched the total memory used by my app in Xcode and it never went over 50% of available memory. </li>
  <li>My app is a mixture of Objective-C and Swift code.  It appears that this is coming from areas of my app that are written in Objective-C, but I am not 100% sure.  </li>
  </ol>
  
  <p>I would love to know if anyone else has experienced this issue and if so what you did to fix it.  I have looked at the other Stack Overlow issues on this and so far none of them have given me any extra insight to this problem.</p>