Quote Originally Posted by VictorN View Post
And what are going to do if some Device object is about to destruct?
Are you going to remove its pointer from the QList<Device*>? How?
I honestly hadn't considered this. I had only thought about cleaning up. Each Device object has a unique ID, which the user provides. I could save the Device pointers along with their IDs in a hash table of sorts (QHash or QMap<int,Device*>). This could allow me to delete the specific pointer. And I could add an event in the destructor, so I am informed if a particular object is deleted.
Does this sound right? Or am I overcomplicating what should be a straightforward task?