Carsten Driesner 写道: > shizhoubo[OOoFrm] schrieb: > >> Hi Carsten, >> >> I understand the cause of crash regarding issue86098 with your help. >> Now, I do some changes which is attachment in the "layoutmanger.cxx", >> Please, review it. >> >> I think while the Layout manger is destroyed,The current misc options >> doesn't remove current layout manger's listeners. >> in other words, the current layout manger 's listener is removed, >> while the Layout manger is destroyed. as stated above is what I >> understand. if you have good suggestion , please tell me. >> > Hi Shizhoubo, > > Your patch looks good but I think we can do more. You can find the > following line in the ctor of layoutmanager.cxx: > > Application::AddEventListener( LINK( this, LayoutManager, > SettingsChanged ) ); > > If you look at the dtor there is no RemoveEventListener call. Please add > it also to the dtor. There is a chance that we can have the same problem > as with the misc options. Therefore we should fix the second problem, too. > > Regards, > Carsten > Hi Carsten, Ok, I see. thank you :-) your means is that we should do some changes in the Layout manger dtor as following:
Application::RemoveEventListener( LINK( this, LayoutManager, SettingsChanged ) ); if ( m_pMiscOptions ) { m_pMiscOptions->RemoveListener( LINK( this, LayoutManager, OptionsChanged ) ); delete m_pMiscOptions; m_pMiscOptions = 0; } that code is added in the Layout manger dtor. Is that so ? if yes I will submit the patch to the issue zilla. Thanks and kind Regards, Shizhoubo