aclChecklistFree() protocol

From: Alan Barrett <apb@dont-contact.us>
Date: Wed, 11 Dec 2002 12:04:08 +0200

I think I have figured out the issue with aclChecklistFree() that I
asked about a few weeks ago. Does the following description look
reasonable? I was thinking of placing it, as a comment, just above the
definition of aclChecklistCreate() in acl.cc.

/*
 * Any aclCheck_t created by aclChecklistCreate() must eventually be
 * freed by aclChecklistFree(). There are two common cases:
 *
 * A) Using aclCheckFast(): The caller creates the aclCheck_t using
 * aclChecklistCreate(), checks it using aclCheckFast(), and frees it
 * using aclChecklistFree().
 *
 * B) Using aclNBCheck() and callbacks: The caller creates the
 * aclCheck_t using aclChecklistCreate(), and passes it to
 * aclNBCheck(). Control eventually passes to aclCheckCallback(),
 * which will invoke the callback function as requested by the
 * original caller of aclNBCheck(). This callback function must
 * *not* invoke aclChecklistFree(). After the callback function
 * returns, aclCheckCallback() will free the aclCheck_t using
 * aclChecklistFree().
 */

--apb (Alan Barrett)
Received on Wed Dec 11 2002 - 03:05:32 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:19:00 MST