D6017: Don't leak MimeData object
This revision was automatically updated to reflect the committed changes. Closed by commit R296:695f24fb522a: Don't leak MimeData object (authored by davidedmundson). REPOSITORY R296 KDeclarative CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D6017?vs=14959&id=15008 REVISION DETAIL https://phabricator.kde.org/D6017 AFFECTED FILES src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h To: davidedmundson, #plasma, mart, hein Cc: hein, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6017: Don't leak MimeData object
hein accepted this revision. hein added a comment. Sounds good REPOSITORY R296 KDeclarative BRANCH master REVISION DETAIL https://phabricator.kde.org/D6017 To: davidedmundson, #plasma, mart, hein Cc: hein, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6017: Don't leak MimeData object
davidedmundson added a comment. > So you're cleaning up the leak the next time the getter is accessed? No? If it's accessed again m_data is not null so we don't get in that branch The main cleanup is implicitly in the DeclarativeDropEvent destructor REPOSITORY R296 KDeclarative BRANCH master REVISION DETAIL https://phabricator.kde.org/D6017 To: davidedmundson, #plasma, mart Cc: hein, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6017: Don't leak MimeData object
hein added a comment. So you're cleaning up the leak the next time the getter is accessed? What if this never happens? REPOSITORY R296 KDeclarative BRANCH master REVISION DETAIL https://phabricator.kde.org/D6017 To: davidedmundson, #plasma, mart Cc: hein, plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6017: Don't leak MimeData object
mart accepted this revision. This revision is now accepted and ready to land. REPOSITORY R296 KDeclarative BRANCH master REVISION DETAIL https://phabricator.kde.org/D6017 To: davidedmundson, #plasma, mart Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas
D6017: Don't leak MimeData object
davidedmundson created this revision. Restricted Application added projects: Plasma, Frameworks. Restricted Application added subscribers: Frameworks, plasma-devel. REVISION SUMMARY A DeclarativeDropArea creates a new DeclarativeDragDropEvent on every enter/move/leave event. The getter method for the mimeData property creates a new MimeData QObject wrapper, which then leaks. Use of the mimeData object outside of the event shouldn't be expected to work, and a quick grep couldn't find any usage. BUG: 380270 TEST PLAN Dragged some things REPOSITORY R296 KDeclarative BRANCH master REVISION DETAIL https://phabricator.kde.org/D6017 AFFECTED FILES src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.cpp src/qmlcontrols/draganddrop/DeclarativeDragDropEvent.h To: davidedmundson, #plasma Cc: plasma-devel, #frameworks, ZrenBot, spstarr, progwolff, lesliezhai, ali-mohamed, jensreuterberg, abetts, sebas, apol, mart, lukas