You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<li><p><strong>size</strong> (<aclass="reference external" href="https://docs.python.org/3/library/functions.html#int" title="(in Python v3.14)"><em>int</em></a>) – Memory size of the buffer</p></li>
778
-
<li><p><strong>mr</strong> (<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MemoryResource</span></code>, optional) – Memory resource associated with the buffer</p></li>
778
+
<li><p><strong>mr</strong> (<codeclass="xref py py-obj docutils literal notranslate"><spanclass="pre">MemoryResource</span></code>, optional) – Memory resource associated with the buffer. When provided,
779
+
<aclass="reference internal" href="cuda.core.MemoryResource.html#cuda.core.MemoryResource.deallocate" title="cuda.core.MemoryResource.deallocate"><codeclass="xref py py-meth docutils literal notranslate"><spanclass="pre">MemoryResource.deallocate()</span></code></a> is called when the buffer is
780
+
closed or garbage collected.</p></li>
779
781
<li><p><strong>owner</strong> (<aclass="reference external" href="https://docs.python.org/3/library/functions.html#object" title="(in Python v3.14)"><em>object</em></a><em>, </em><em>optional</em>) – An object holding external allocation that the <codeclass="docutils literal notranslate"><spanclass="pre">ptr</span></code> points to.
780
782
The reference is kept as long as the buffer is alive.
781
783
The <codeclass="docutils literal notranslate"><spanclass="pre">owner</span></code> and <codeclass="docutils literal notranslate"><spanclass="pre">mr</span></code> cannot be specified together.</p></li>
@@ -784,8 +786,9 @@ <h1>cuda.core.Buffer<a class="headerlink" href="#cuda-core-buffer" title="Link t
784
786
</dl>
785
787
<divclass="admonition note">
786
788
<pclass="admonition-title">Note</p>
787
-
<p>This creates a non-owning reference. The pointer will NOT be freed
788
-
when the Buffer is closed or garbage collected.</p>
789
+
<p>When neither <codeclass="docutils literal notranslate"><spanclass="pre">mr</span></code> nor <codeclass="docutils literal notranslate"><spanclass="pre">owner</span></code> is specified, this creates a
790
+
non-owning reference. The pointer will NOT be freed when the
791
+
<aclass="reference internal" href="#cuda.core.Buffer" title="cuda.core.Buffer"><codeclass="xref py py-class docutils literal notranslate"><spanclass="pre">Buffer</span></code></a> is closed or garbage collected.</p>
0 commit comments