Hi:

I've written this program that does in general lines does the following.

1) Defines this class Proc with a pointer to a generic class I've written called A (private variable in Proc.h declared as A *a).

2) According to user input I need to crete a child (of A) Class B or C. Each of these classes contain a variation of a variable of the type QVector < QVector <qreal> > data . So the code for this creation (in a function inside a Proc object) goes like this: C *c = new C (parmeters); a = c;

3) When the B or C classes are constructed data is initialized again according to user input.

4) the actual process the program needs to run basically updates over and over again data in these classes (B or C) . However here (and not before this process begins) I notice a 20Mb (using the windows task administrator) increase of the memory consumed.

5) After the updating process is done, the user might change a value. Then the program recreates the class deleting the previous implementation (the line here is simply delete a) and then creates a new C or B object. Then the updating process is run again but again I notice the 20Mb increase in memory.

However here is what I don't get if all of the variables used by the function that does the updating are local.. how can the memory increase?

I thought all local variables are automatically deleted (memory returned) when the function ends its execution.

I would really appreaciate any help.

Thanks