Hi,
Firstly, how far do I need to take 'delete' in class destructers in Qt ?
In other systems I've used (Borland & Windows) it was always best to have a matching 'delete' for every instance of a 'new' even if it was not directly used at shutdown (the item had possibly already been destroyed earlier on in the shutdown process).
In Qt if I have say a class called wigetX that I add as a 'new' in the mainWindow Program, and widgetX itself has a number of 'new' items in it (pushbuttons, labels etc), will calling delete on widgetX in the mainWindow destructor be enough or should I also call delete within the widgetX destructor for each of the 'new' items in widgetX ?
Secondly, I need to pass data between two threads using a FIFO buffer arrangement. I've already programmed this using a QReadWriteLock to protect shared acess to the data pointers and it works fine, but as I am finding out with Qt a great many functions have already been written and I may be reinventing the wheel - is there a class already out there for this process - possibly QQueue ?
Bookmarks