Hi,

I have a class that has a member of type
Qt Code:
  1. QValueList<AClassOfMine*> list
To copy to clipboard, switch view to plain text mode 

and a function
Qt Code:
  1. void addClass(AClassOfMine value)
To copy to clipboard, switch view to plain text mode 
This function do only the two following lines of code
Qt Code:
  1. AClassOfMine* myClass = new AClassOfMine(value);
  2. list.append(myClass);
To copy to clipboard, switch view to plain text mode 

How can I remove and free all elements in my list ?

For the moment I just do
Qt Code:
  1. list.clear()
To copy to clipboard, switch view to plain text mode 
but I expect some memory leaks to soon come.

So, how can I solve my problem ?

Thanks in advance