Q: How to delete a QStrList ?

Roberto Alsina ralsina at unl.edu.ar
Tue Feb 15 14:43:36 GMT 2000


On Tue, 15 Feb 2000, Wolf-Ruediger Juergens wrote:

> Hi,
> Can anyone help me for this problem ?
> I have this code:
> QStrList strlist = new QStrList();

Er, shouldn't that be 

QStrList *strlist = new QStrList();

?

>  ...
> // do something
> delete strlist;
> Than the compiler says no pointer to delete .
> How can I delete the list ?

why not just 

QStrList strlist;

and let it delete itself?

 ("\''/").__..-''"`-. .         Roberto Alsina
 `9_ 9  )   `-. (    ).`-._.`)  ralsina at unl.edu.ar
 (_Y_.)' ._   ) `._`.  " -.-'   Centro de Telematica
  _..`-'_..-_/ /-'_.'           Universidad Nacional del Litoral
(l)-'' ((i).' ((!.'             Santa Fe - Argentina
                                KDE Developer (MFCH)
The stone age didn't end for a lack of stone" Firoz Rasul





More information about the KDevelop mailing list