This section addresses a common confusion among Insure users.
Insure does not report what would be a
error when it occurs in the function
main. To illustrate
why, I will use the following simple example.
char *ptr = malloc(10);
This may look like a memory leak, but it really is not. The pointer
ptr points to the block of memory allocated by the call
malloc until the program leaves the function's
scope. However, at that point, the program has terminated and the memory
is freed by the OS. There is never a point during program execution where
there is not a valid pointer to the block, which would allow it to be freed.
Since there is always a valid pointer to the block of memory while the
program is running, it is not leaked. This is
classified by Insure as an outstanding allocated
memory block. For more information on this topic, see the
section of the Insure++ User's Guide.
If you are interested in seeing such blocks
reported, you can simply add the option
.psrc file and run your program again.
Insure will then print
a report of all outstanding memory blocks with allocation stack traces.
For more information .
call (888) 305-0041, fax (626)305-9048, or