<html>
    <head>
      <base href="https://bugs.webkit.org/" />
    </head>
    <body>
      <p>
        <div>
            <b><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Typed Arrays have no public facing API"
   href="https://bugs.webkit.org/show_bug.cgi?id=120112#c35">Comment # 35</a>
              on <a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - Typed Arrays have no public facing API"
   href="https://bugs.webkit.org/show_bug.cgi?id=120112">bug 120112</a>
              from <span class="vcard"><a class="email" href="mailto:dominic.szablewski&#64;gmail.com" title="Dominic Szablewski &lt;dominic.szablewski&#64;gmail.com&gt;"> <span class="fn">Dominic Szablewski</span></a>
</span></b>
        <pre><span class="quote">&gt; We say &quot;Create&quot; or &quot;Copy&quot; when we make something that needs a release. Here
&gt; I would use &quot;Copy&quot; I guess.</span >

Right, but &quot;JSObjectCopyTypedArrayData&quot; would be misleading, in that it implies you get a copy of the data and modifying the data wouldn't do anything on the Typed Array from where it was copied. Maybe it should be named JSDataWrapper instead: i.e. JSObjectCopyTypedArrayDataWrapper()!? I'm not really fan of the verbosity, though.

Two more ideas:

a) JSObjectGetTypedArrayData() returns a JSDataRef unretained. If you want to hold on to it, you have to retain it yourself. I'm not sure if this is feasible - the JSDataRef would have to last as least until the scope of the function that called JSObjectGetTypedArrayData exits.

b) We name the function in a way that doesn't follow the create/copy nomenclature, but clearly states that you own the JSDataRef. I'd propose JSObjectGetRetainedTypedArrayData() or JSObjectGetTypedArrayDataRetain().

If it's possible in a sane matter, I think a) is preferable. Can anybody confirm if this would be feasible? Does JSC implement something like objc's autorelease?</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>