-
-
Notifications
You must be signed in to change notification settings - Fork 570
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
BUG:378313 Fix warnings about qlayout
Patch by Bruno P. Kinoshita, Thanks!
- Loading branch information
1 parent
e02948b
commit 1d2343c
Showing
1 changed file
with
2 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1d2343c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After your fix there is the allocation of memory and the assignment to the bare pointer. If something happens at that moment there might be memory leak. Preventing it is a very good reason for setting a parent in a constructor.
1d2343c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addLayout method sets a parent object on hl, so there is no memory leak.
1d2343c
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The addLayout sets a parent object, however there is plenty of code before it is called. It is possible to have an exception somewhere in the middle.