Boost logo

Boost :

From: Igor Smirnov (vonrog_at_[hidden])
Date: 2005-03-25 13:05:54


Hi All,

        What do you think about optional set of new/delete operators which
clean memory in delete() by filling it with zeros. I mean an
implementation with the standard syntax, so that any old program using
the standard new/delete can be linked with the modified version of
new/delete without any change in the program text and even without its
recompilation. I have never heard whether this simple idea was
implemented anywhere. In fact, these operators are useful for sequre
aplications, which are not expected to leave significant information in
the dynamic memory. This is also useful for debug of any program that
uses direct allocations with raw pointers, the style which it known to
be prone to errors. The use of already deleted information is more
likely to be detected, if this information is physically deleted. The
cleaning new/delete operators might be made very simple (almost trivial,
except exception safety) and perhaps completely portable. Does this idea
look useful?

Regards
        Igor Smirnov


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk