summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRalph Giles <giles@xiph.org>2008-04-28 03:27:06 +0000
committerRalph Giles <giles@xiph.org>2008-04-28 03:27:06 +0000
commit780f7f8120ba1606c587e5b12ad61a0f86ace330 (patch)
treeb7da05c31d7ce8c3a83e67b48d6c11be6c719784 /doc
parent44fef609e62a3f3d0fc3064881e31829e93204cd (diff)
downloadogg-780f7f8120ba1606c587e5b12ad61a0f86ace330.tar.gz
Clarify that the _destroy() methods call _ogg_free() on their arguments
even though there's no explicit constructor. git-svn-id: http://svn.xiph.org/trunk/ogg@14810 0101bb08-14d6-0310-b084-bc0e0c8e3800
Diffstat (limited to 'doc')
-rw-r--r--doc/libogg/ogg_stream_destroy.html9
-rw-r--r--doc/libogg/ogg_sync_destroy.html8
2 files changed, 15 insertions, 2 deletions
diff --git a/doc/libogg/ogg_stream_destroy.html b/doc/libogg/ogg_stream_destroy.html
index 5badc94..9a07de3 100644
--- a/doc/libogg/ogg_stream_destroy.html
+++ b/doc/libogg/ogg_stream_destroy.html
@@ -18,7 +18,14 @@
<p><i>declared in "ogg/ogg.h";</i></p>
<p>This function frees the memory used by the <a href="ogg_stream_state.html">ogg_stream_state</a> struct.
-<p>This should be called when you are done working with an ogg stream. It can also be called to make sure that the struct does not exist.
+
+<p>This should be called when you are done working with an ogg stream.
+It can also be called to make sure that the struct does not exist.</p>
+
+<p>It calls free() on its argument, so if the ogg_stream_state
+is not malloc()'d or will otherwise be freed by your own code, use
+<a href="ogg_stream_clear.html">ogg_stream_clear</a> instead.</p>
+
<br><br>
<table border=0 color=black cellspacing=0 cellpadding=7>
<tr bgcolor=#cccccc>
diff --git a/doc/libogg/ogg_sync_destroy.html b/doc/libogg/ogg_sync_destroy.html
index 19987a2..687aa97 100644
--- a/doc/libogg/ogg_sync_destroy.html
+++ b/doc/libogg/ogg_sync_destroy.html
@@ -17,7 +17,13 @@
<p><i>declared in "ogg/ogg.h";</i></p>
-<p>This function is used to destroy an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and free all memory used.
+<p>This function is used to destroy an <a href="ogg_sync_state.html">ogg_sync_state</a> struct and free all memory used.</p>
+
+<p>Note this calls free() on its argument so you should only use this
+function if you've allocated the ogg_sync_state on the heap. If it is
+allocated on the stack, or it will otherwise be freed by your
+own code, use <a href="ogg_sync_clear.html">ogg_sync_clear</a> instead
+to release just the internal memory.</p>
<br><br>
<table border=0 color=black cellspacing=0 cellpadding=7>