]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count
authorPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 30 Aug 2013 15:48:16 +0000 (15:48 +0000)
committerPhilippe Waroquiers <philippe.waroquiers@skynet.be>
Fri, 30 Aug 2013 15:48:16 +0000 (15:48 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13519

include/pub_tool_poolalloc.h

index e661d9ed4d83f5c6e4462c8c0ef25871520bac20..cd00790576f21b70338faa23796646a53a13d698 100644 (file)
@@ -72,10 +72,11 @@ extern void VG_(freeEltPA) ( PoolAlloc* pa, void* p);
    pool allocator.
    The Pool Allocator provides support to use a ref counter
    to detect a pool allocator is not needed anymore.
-   It is the caller responsibility to delete the PA if the ref counter
-   drops to 0. In other words, this just helps the caller to manage
-   the PA memory destruction but it does not fully manage it.
-   Note that the usage of pool reference counting is optional. */
+   It is the caller responsibility to call VG_(addRefPA) for
+   each new reference to a pool and VG_(releasePA) when such a reference
+   disappears.
+   VG_(releasePA) will automatically call VG_(deletePA)
+   to delete the PA when the ref counter drops to 0. */
 
 // VG_(addRefPA) indicates there is a new reference to pa.
 extern void VG_(addRefPA) ( PoolAlloc* pa);