<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Modern IDB: Ref-cycles and leaks"
   href="https://bugs.webkit.org/show_bug.cgi?id=154015#c4">Comment # 4</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Modern IDB: Ref-cycles and leaks"
   href="https://bugs.webkit.org/show_bug.cgi?id=154015">bug 154015</a>
              from <span class="vcard"><a class="email" href="mailto:beidson&#64;apple.com" title="Brady Eidson &lt;beidson&#64;apple.com&gt;"> <span class="fn">Brady Eidson</span></a>
</span></b>
        <pre>(In reply to <a href="show_bug.cgi?id=154015#c3">comment #3</a>)
<span class="quote">&gt; (In reply to <a href="show_bug.cgi?id=154015#c2">comment #2</a>)
&gt; &gt; Next in line is IDBDatabase:
&gt; &gt; 
&gt; &gt; It has a couple of refs that come and go during event dispatch, all nicely
&gt; &gt; balanced.
&gt; &gt; 
&gt; &gt; It's initial ref is held as the result of the OpenDBRequest. So as long as
&gt; &gt; the open DB request is cleaned up, we're fine.
&gt; &gt; 
&gt; &gt; In the case of an upgrade needed, it's next ref is held by the version
&gt; &gt; change IDBTransaction.
&gt; &gt; 
&gt; &gt; And, in fact, that ref lasts as long as the transaction object, which is &quot;a
&gt; &gt; very very long time.&quot;
&gt; &gt; 
&gt; &gt; To see if there's anything circular there, I'll now dig in to the
&gt; &gt; transaction lifetime.
&gt; 
&gt; Transactions leak a couple of different ways.
&gt; 
&gt; One huge way is that TransactionOperations leak! Yikes. That one is an easy
&gt; fix.
&gt; 
&gt; <a class="bz_bug_link 
          bz_status_ASSIGNED "
   title="ASSIGNED - Modern IDB: TransactionOperation objects leak"
   href="show_bug.cgi?id=154054">https://bugs.webkit.org/show_bug.cgi?id=154054</a> for that</span >

So with the fix for 154054, and with the previous fix for IDBOpenDBRequests, the most basic example of IDB usage works without leaks.

Attaching that &quot;basic-test.html&quot; that I've been using so far.

I'll start adding to it now to explore other options in the IDB cloud. (Non OpenDB requests, object stores, indexes, cursors...)</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are the assignee for the bug.</li>
      </ul>
    </body>
</html>