Hi
One of my classes (MyClass) inherits from QObject (for signals/slot). This class is created by the GUI front end when I load a valid data file into my program. In the GUI constructor I set the pointer to MyClass to NULL.
If there is an existing instance of MyClass then it is deleted and its pointer set to NULL. (there will only ever be one instance of MyClass)
If a valid file is loaded, I check that the pointer is not NULL before deleting MyClass object (if there was one). Is this the correct way of doing this?
Is there a better way?
Regards
Bookmarks