title: Using Safari web inspector to debug memory leak?
body: <p>FYI, we are debugging our mobile hybrid app which was develop using angularJS 1.4.2 and ionic framework 1.2.4 with WKWebView.</p>
  
  <p>The multiple snapshots below is to show the events before and after. Based on <a href="https://webkit.org/blog/6425/memory-debugging-with-web-inspector/" rel="noreferrer">webkit memory debugging article</a>, the snapshot will show the live JavaScript objects which has not yet been GC.<br>
  <a href="https://webkit.org/blog/6425/memory-debugging-with-web-inspector/" rel="noreferrer"><img src="https://i.stack.imgur.com/AlULo.png" alt="Snapshot of series of action taken"></a></p>
  
  <p>Snapshot 2 showing the default state of page A and controller A.
  <a href="https://i.stack.imgur.com/8qCE1.png" rel="noreferrer"><img src="https://i.stack.imgur.com/8qCE1.png" alt="snapshot2"></a></p>
  
  <p>Snapshot 5 is still in the same page but after doing some calculation and generated a base64 string pdf from PDFTron to view it on UIWebview.
  <a href="https://i.stack.imgur.com/CF4Jv.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CF4Jv.png" alt="snapshot5"></a></p>
  
  <p>Snapshot 10 showing after exit page A and navigate to page C with controller C.
  <a href="https://i.stack.imgur.com/9yzBu.png" rel="noreferrer"><img src="https://i.stack.imgur.com/9yzBu.png" alt="snapshot10"></a></p>
  
  <p>Comparison of snapshot 2 and snapshot 10, all the base64 string still remain there.
  <a href="https://i.stack.imgur.com/oPcPC.png" rel="noreferrer"><img src="https://i.stack.imgur.com/oPcPC.png" alt="Comparison of snapshot2 and 10"></a></p>
  
  <p><strong>Questions:</strong></p>
  
  <ol>
  <li>Is it normal when the size of snapShot keep increasing without reduce, is it consider memory leak?</li>
  <li>The snapshot size is representing all the live javascript objects only or it will show all the object that we visited whether it is live or not, just like some history objects in the app?</li>
  <li>What is the different of snapshot size and snapshot live size?</li>
  <li>AngularJS will help to destroy the scope when navigate to next controller, we also disable cache on ionic. So is these base64 string consider memory leak item also?</li>
  </ol>