[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Removing defensive copy on return

From: Joel Reicher
Subject: Re: [Nmh-workers] Removing defensive copy on return
Date: Tue, 25 Apr 2006 00:32:28 +1000

> If people agree, I'd like to go through the nmh code replacing defensive
> copying on return with a const return value, and of course go through
> the rest of the code fixing any warnings about constness being casted
> away.
> I think defensive copying is the right thing in many situations, but not
> for returned data, since it might be a completely unnecessary overhead,
> and it also makes memory management hard to comprehend since the allocation
> takes place in a different part of the code than the freeing.

Disregard that. The issues in the code are more complicated than I
initially thought, and a lot of what's going on is not defensive copying.

But the memory management *does* need to be made more sensible.


        - Joel

reply via email to

[Prev in Thread] Current Thread [Next in Thread]