Skip to content

Commit 9137407

Browse files
Small addition to the documentation.
1 parent a2c411c commit 9137407

File tree

3 files changed

+44
-36
lines changed

3 files changed

+44
-36
lines changed

docs/html/index.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@ <h1><a class="anchor" id="quick_start"></a>
133133

134134
VkBuffer buffer;
135135
vmaCreateBuffer(allocator, &amp;bufferInfo, &amp;memReq, &amp;buffer, nullptr, nullptr);
136+
</pre><p>When no longer needed, destroy your buffer or image using <a class="el" href="group__layer3.html#ga967857c06b8232b2a54936daf36d1535">vmaDestroyBuffer()</a> / <a class="el" href="group__layer3.html#ga9377799736c4a1262b41ee441e5fc877">vmaDestroyImage()</a>. This function would also free memory bound to it.</p>
137+
<pre class="fragment">vmaDestroyBuffer(allocator, buffer);
136138
</pre><h1><a class="anchor" id="configuration"></a>
137139
Configuration</h1>
138140
<p>Set VMA_STATS_STRING_ENABLED macro in <a class="el" href="vk__mem__alloc_8h.html">vk_mem_alloc.h</a> to 0 or 1 to disable/enable compilation of code for dumping internal allocator state to string in JSON format.</p>

docs/html/vk__mem__alloc_8h_source.html

Lines changed: 36 additions & 36 deletions
Large diffs are not rendered by default.

src/vk_mem_alloc.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ When you want to create a buffer or image:
122122
VkBuffer buffer;
123123
vmaCreateBuffer(allocator, &bufferInfo, &memReq, &buffer, nullptr, nullptr);
124124
125+
When no longer needed, destroy your buffer or image using vmaDestroyBuffer() / vmaDestroyImage().
126+
This function would also free memory bound to it.
127+
128+
129+
vmaDestroyBuffer(allocator, buffer);
130+
125131
\section configuration Configuration
126132
127133
Set VMA_STATS_STRING_ENABLED macro in vk_mem_alloc.h to 0 or 1 to disable/enable

0 commit comments

Comments
 (0)