antani wrote:
Every time that I call a function, time for execution and memory
allocation program increase.
I use stl vector, and 5 array c++ style and I remove them in
destructor.
Can you suggest me a solution for debugging memory leak?
Why do you think you have a memory leak? If you're using Task Manager,
it's notoriously wrong. Secondly, often a program's memory size will
increase with no leak, because while dynamically allocated memory is
returned to the free store, that memory is still allocated to the
process and not returned to the OS.
So:
int main()
{
char *bigalloc = new char[10000000];
delete[] bigalloc;
while (true)
/* do nothing */ ;
}
will often show a size of 10000000 in the loop, even though there is no
memory leak.
Such issues are implementation dependent.