Bug 453201 - Kirigami.ApplicationItem causes heavy memory leaks when used in QQuickView
Summary: Kirigami.ApplicationItem causes heavy memory leaks when used in QQuickView
Status: RESOLVED FIXED
Alias: None
Product: frameworks-kirigami
Classification: Unclassified
Component: general (show other bugs)
Version: Master
Platform: openSUSE RPMs Linux
: NOR major (vote)
Target Milestone: Not decided
Assignee: Marco Martin
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-04-29 16:44 UTC by Fushan Wen
Modified: 2022-05-16 14:49 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In: 5.95


Attachments
ApplicationItemLeakTest.tar.gz (11.57 KB, application/gzip)
2022-04-29 16:44 UTC, Fushan Wen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Fushan Wen 2022-04-29 16:44:28 UTC
Created attachment 148460 [details]
ApplicationItemLeakTest.tar.gz

SUMMARY
Kirigami.ApplicationItem doesn't free its memory after QQuickView is destroyed. For more information please see the example program in the attachment. The bug has caused severe memory leaks in Plasma config dialog, especially the wallpaper config dialog.

STEPS TO REPRODUCE
1. Run ApplicationItemLeakTest
2. Watch system monitor

OBSERVED RESULT
Memory grows very fast

EXPECTED RESULT
No memory leak

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20220426
KDE Plasma Version: 5.24.80
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.2
Kernel Version: 5.17.4-1-default (64-bit)
Graphics Platform: X11
Processors: 8 × AMD Ryzen 7 4700U with Radeon Graphics
Memory: 15.0 GiB of RAM
Graphics Processor: AMD RENOIR
Manufacturer: HP
Product Name: HP ZHAN 66 Pro A 14 G3
Comment 1 Fushan Wen 2022-05-16 06:55:05 UTC
Git commit 72a43783b5439637febfb20bbb70a0523fa9b9c7 by Fushan Wen, on behalf of David Edmundson.
Committed on 16/05/2022 at 06:55.
Pushed by fusionfuture into branch 'master'.

[ColumnView] Don't leak SeparatorItems

Any children from a created component must have either QML ownership or
a parent or manual destruction. Another code path in ColumnView can
delete separators at runtime so a parent is used.

M  +2    -0    src/columnview.cpp

https://invent.kde.org/frameworks/kirigami/commit/72a43783b5439637febfb20bbb70a0523fa9b9c7