Q: How to delete a QStrList ?
Wolf-Ruediger Juergens
WJuergens at t-online.de
Tue Feb 15 21:20:42 GMT 2000
Roberto Alsina wrote:
>
> 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?
Hi,
Thanks for all the hint´s , I really need a strlist not a pointer, and was
wondering about the delete failure message. So if you mean the list is
deleted just at end of the program ... no problem , but I thought that I
waste resources if I not delete the list.
Thanks
Wolf
--
Smoking is one of the leading causes of statistics.
-- Fletcher Knebel
More information about the KDevelop
mailing list