Re: Chunked mempools, a first verdict

From: Alex Rousskov <rousskov@dont-contact.us>
Date: Thu, 3 May 2001 08:51:41 -0600 (MDT)

On Thu, 3 May 2001, Andres Kroonmaa wrote:

> thats how it is done. memPoolClean(MemPool * NULL) does full cleanup.

IMHO, it is a dangerous practice to rely on NULL pointers to change
the behavior of a function because the pool pointer you feed somewhere
deep in the source code may end up being NULL for many reasons out of
your control. I would say that having two functions:
        memPoolClean(MemPool*)
        memPoolCleanAll()
is a better interface than one
        memPoolClean(MemPool *pool = NULL);

Then, again, I am not a strong believer in reducing the number of
exported names at the expense of the design...

Thanks,

Alex.
Received on Thu May 03 2001 - 08:51:51 MDT

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