From: Philippe Waroquiers Date: Fri, 30 Aug 2013 15:48:16 +0000 (+0000) Subject: Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count X-Git-Tag: svn/VALGRIND_3_9_0~172 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a44190db930727646a91d45ec9e387ac19579449;p=thirdparty%2Fvalgrind.git Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count git-svn-id: svn://svn.valgrind.org/valgrind/trunk@13519 --- diff --git a/include/pub_tool_poolalloc.h b/include/pub_tool_poolalloc.h index e661d9ed4d..cd00790576 100644 --- a/include/pub_tool_poolalloc.h +++ b/include/pub_tool_poolalloc.h @@ -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);