Sorry I have to reopen this question:
I tried the code jpn suggested, the code worked fine, but the problem is still there.
Also for those widgets, for example, the initialization of them, the formal way is
Wedgit awedgit=new Wedgit(* parent); or awdgit=Wedgit(*parent);?
Then this means the parent, has to be a pointer when instantiated? '
Then that means in the Child class, I will have to declare some pointers to Widget (that is the parents) so that means the memory leak is not preventable?
Bookmarks