yellowmat
13th February 2006, 15:15
Hi,
I have a class that has a member of type
QValueList<AClassOfMine*> list
and a function
void addClass(AClassOfMine value)
This function do only the two following lines of code
AClassOfMine* myClass = new AClassOfMine(value);
list.append(myClass);
How can I remove and free all elements in my list ?
For the moment I just do
list.clear()
but I expect some memory leaks to soon come.
So, how can I solve my problem ?
Thanks in advance
I have a class that has a member of type
QValueList<AClassOfMine*> list
and a function
void addClass(AClassOfMine value)
This function do only the two following lines of code
AClassOfMine* myClass = new AClassOfMine(value);
list.append(myClass);
How can I remove and free all elements in my list ?
For the moment I just do
list.clear()
but I expect some memory leaks to soon come.
So, how can I solve my problem ?
Thanks in advance