- An object, say controller, owns another object, say agent
- Controller subscribes to a event (signal) from agent called closing
- If the agent issues a closing signal, the controller removes it from a list of known agents (effectively freeing it as a result of the QSharedPointer).
- If the controller is closing, it calls close on the agents and then removes them from its list.
Wednesday, April 24, 2013
In working with Qt and its slot and signals, I've encountered quite a few double free errors despite my use of QSharedPointer. One particularly puzzling situation, I have stumbled upon involves the following model:
Posted by David Wolinsky at 9:18 PM