Who frees what is always important.  In general a list manager should
have no notion and make no assumptions about the structure or
organization of the things it puts into and removes from the list.

I tell my students that they should think of these things as SOTs,
instances of Something Out There.  What they should deal in is a
pointer to a SOT [and sometimes a key too]  and a chaining block (CB)
specific to the list, which always contains 1) a pointer to the SOT
and 2) the additional chaining pointers required by the list
organization.

The SOT belongs to a 'user'.  Its storage is never freed.  The CBs
belong to the list, which allocates and frees their storage.

John Gilmore, Ashland, MA 01721 - USA

----------------------------------------------------------------------
For IBM-MAIN subscribe / signoff / archive access instructions,
send email to [email protected] with the message: INFO IBM-MAIN

Reply via email to