[umbrello] [Bug 445275] CodeGenerator* UMLApp::m_codegen is never destroyed

"Robert Hairgrove" <[email protected]>
Newsgroups gmane.linux.umbrello.devel
Message-ID <[email protected]/>
https://bugs.kde.org/show_bug.cgi?id=445275

--- Comment #1 from Robert Hairgrove <[email protected]> ---
Following up on this, it seems that there are very many instances where the
parent-child relationship between QObject/QWidget and derived classes is not
respected:

1. Either the derived class does not initialize its base class QObject or
QWidget with a "parent" object, in which case it must be manually deleted (and
is sometimes forgotten as in the case of CodeGenerator classes);

2. The derived class DOES initialize its base class with a parent, but it is
deleted nonetheless manually somewhere else (as in the class "DiagramsWindow"
-- the class UMLAppPrivate, derived from QObject, contains a pointer
"diagramsWindow" which it creates in its member initialization list on line 80
and passes "this" as the parent. However, the destructor of UMLAppPrivate ALSO
deletes the same pointer, although QObject will delete all of its children on
application shutdown.

This is certainly cause for a lot of strange crashes and/or memory leaks.

-- 
You are receiving this mail because:
You are the assignee for the bug.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.