|
From: Brian C. <cr...@fi...> - 2005-09-11 23:43:34
|
int
main()
{
char *ptr = new char[10]
return;
}
Isn't necessarily a leak for valgrind. Your memory is still
referencABLE, just not destroyed explicitly. If you want to see
-everything- that hasn't been destroyed, run your program with
--show-reachable=yes
Ken Stanley wrote:
>In my application, Amesos,
>http://software.sandia.gov/trilinos/packages/amesos/index.html,
>many memory leaks are not found by valgrind 2.2 and 3.01. Pointers (or other
>structures) defined in one of the Amesos classes, and allocated but not
>deallocated are not identified as being lost or even reachable.
>
>I have even added a bogus pointer, allocated space for it using new int[10],
>never deallocating it. This is not caught by valgrind 3.01. (I did not check
>2.2 on this particular case).
>
>These memory leaks are not caught when the Amesos classes are created through a
>factory interface, but they are caught when the Amesos classes are created
>directly (not through the factory interface).
>
>Ken
>
>Ken Stanley
>440 774 4322 7AM-9PM Eastern Time
>
>
>-------------------------------------------------------
>SF.Net email is Sponsored by the Better Software Conference & EXPO
>September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
>Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
>Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
>_______________________________________________
>Valgrind-users mailing list
>Val...@li...
>https://lists.sourceforge.net/lists/listinfo/valgrind-users
>
>
>
>
>
|