refactor: improve ContainerBox geometry handling and add missing signal disconnections to prevent memory leaks.
This commit is contained in:
@@ -36,6 +36,12 @@ ObjectsContext::ObjectsContext(uLib::ObjectsContext *context)
|
||||
}
|
||||
|
||||
ObjectsContext::~ObjectsContext() {
|
||||
if (m_Context) {
|
||||
Object::disconnect(m_Context, &uLib::ObjectsContext::ObjectAdded, this,
|
||||
&ObjectsContext::OnObjectAdded);
|
||||
Object::disconnect(m_Context, &uLib::ObjectsContext::ObjectRemoved, this,
|
||||
&ObjectsContext::OnObjectRemoved);
|
||||
}
|
||||
for (auto const &[obj, prop3d] : m_Prop3Ds) {
|
||||
delete prop3d;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user