|
From: <sv...@va...> - 2013-08-30 15:48:26
|
philippe 2013-08-30 15:48:16 +0000 (Fri, 30 Aug 2013)
New Revision: 13519
Log:
Fix misleading comment, as VG_(releasePA) is deleting the PA when zero ref count
Modified files:
trunk/include/pub_tool_poolalloc.h
Modified: trunk/include/pub_tool_poolalloc.h (+5 -4)
===================================================================
--- trunk/include/pub_tool_poolalloc.h 2013-08-29 17:59:27 +00:00 (rev 13518)
+++ trunk/include/pub_tool_poolalloc.h 2013-08-30 15:48:16 +00:00 (rev 13519)
@@ -72,10 +72,11 @@
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);
|