You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by st...@apache.org on 2003/12/12 13:17:57 UTC
cvs commit: apr/include apr_pools.h
striker 2003/12/12 04:17:56
Modified: include apr_pools.h
Log:
Clarify what is and isn't safe to do with cleanups.
Revision Changes Path
1.110 +6 -1 apr/include/apr_pools.h
Index: apr_pools.h
===================================================================
RCS file: /home/cvs/apr/include/apr_pools.h,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -r1.109 -r1.110
--- apr_pools.h 3 Nov 2003 17:00:15 -0000 1.109
+++ apr_pools.h 12 Dec 2003 12:17:56 -0000 1.110
@@ -514,7 +514,12 @@
* Cleanup
*
* Cleanups are performed in the reverse order they were registered. That is:
- * Last In, First Out.
+ * Last In, First Out. A cleanup function can safely allocate memory from
+ * the pool that is being cleaned up. It can also safely register additional
+ * cleanups which will be run LIFO, directly after the current cleanup
+ * terminates. Cleanups have to take caution in calling functions that
+ * create subpools. Subpools, created during cleanup will NOT automatically
+ * be cleaned up. In other words, cleanups are to clean up after themselves.
*/
/**