philwinder
21st April 2008, 09:11
Hey,
I have a pretty fundamental question that I cannot seem to find the answer for in either the documentation or the forums.
Which items should I call delete xyx; on, and which items do I not? Is there a hard-fast rule? Since I read the other day that all items derived from QWidget, do not need to be deleted because Qt deletes them automatically.
I say this because before I removed the deletes, I was getting lots of crashes. But now I worry that I am creating lots of memory leaks.
Thanks,
Phil Winder
I have a pretty fundamental question that I cannot seem to find the answer for in either the documentation or the forums.
Which items should I call delete xyx; on, and which items do I not? Is there a hard-fast rule? Since I read the other day that all items derived from QWidget, do not need to be deleted because Qt deletes them automatically.
I say this because before I removed the deletes, I was getting lots of crashes. But now I worry that I am creating lots of memory leaks.
Thanks,
Phil Winder