|
From: Tom H. <th...@cy...> - 2004-04-13 21:37:03
|
In message <Pin...@ye...>
Nicholas Nethercote <nj...@ca...> wrote:
> So if a program has its own version of new or new[], Valgrind doesn't know
> anything about them, and any heap blocks allocated with them won't be
> checked as normal? Is it possible to have a custom 'new' but a non-custom
> 'delete'? That could cause false free errors?
Well it's possible in as much as you could write code to do that, but
it would usually be a bad plan as the custom new would presumably have
allocated memory in some special way that an ordinary delete wouldn't
know how to free.
I guess you might have a custom new that does an ordinary new and then
initialises the memory or something, so that the ordinary delete would
be fine.
Tom
--
Tom Hughes (th...@cy...)
Software Engineer, Cyberscience Corporation
http://www.cyberscience.com/
|