refactor: improve ContainerBox geometry handling and add missing signal disconnections to prevent memory leaks.

This commit is contained in:
AndreaRigoni
2026-04-21 14:06:35 +00:00
parent 503c325f9a
commit 2bf3dc0b6d
7 changed files with 154 additions and 150 deletions

View File

@@ -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;
}