Skip to content

Commit 6ae3e2a

Browse files
authored
Fix memory leak in extension::GUI ScrollView. (#2821)
Fix memory leak in ScrollView. _animatedScrollAction is retained but was not released on destruction of the ScrollView.
1 parent c380a17 commit 6ae3e2a

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

extensions/GUI/src/GUI/ScrollView/ScrollView.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,11 @@ ScrollView::ScrollView()
6767
, _animatedScrollAction(nullptr)
6868
{}
6969

70-
ScrollView::~ScrollView() {}
70+
ScrollView::~ScrollView()
71+
{
72+
if (_animatedScrollAction)
73+
_animatedScrollAction->release();
74+
}
7175

7276
ScrollView* ScrollView::create(Size size, Node* container /* = nullptr*/)
7377
{

0 commit comments

Comments
 (0)