File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -56,8 +56,10 @@ namespace Hyprutils {
5656 }
5757
5858 ~impl_base () {
59- destroy ();
60- if (m_control->_weak == 0 && m_control->_ref == 0 )
59+ if (m_control->_ref == 0 )
60+ destroy ();
61+
62+ if (m_control->_weak == 0 )
6163 delete m_control;
6264 }
6365
Original file line number Diff line number Diff line change @@ -170,10 +170,14 @@ static void testHierarchy() {
170170
171171 child.reset ();
172172 EXPECT_TRUE (ifaceAWeak);
173+ EXPECT_TRUE (ifaceA);
173174 EXPECT_EQ (ifaceAWeak->m_ifaceAInt , 69 );
175+ EXPECT_EQ (ifaceA->m_ifaceAInt , 69 );
174176 ifaceA.reset ();
175177 EXPECT_TRUE (ifaceAWeak);
176178 EXPECT_EQ (ifaceAWeak->m_ifaceAInt , 69 );
179+ EXPECT_TRUE (ifaceB);
180+ EXPECT_EQ (ifaceB->m_ifaceBInt , 2 );
177181 ifaceB.reset ();
178182 EXPECT_TRUE (!ifaceAWeak);
179183 }
You can’t perform that action at this time.
0 commit comments