To comment on the following update, log in, then open the issue: http://www.openoffice.org/issues/show_bug.cgi?id=108132 Issue #|108132 Summary|SD memory leak, SdStyleSheetPool object is not release |d when SD document is closed Component|Presentation Version|OOO320m8 Platform|All URL| OS/Version|All Status|UNCONFIRMED Status whiteboard| Keywords| Resolution| Issue type|DEFECT Priority|P1 Subcomponent|code Assigned to|graphicsneedsconfirm Reported by|shengze
------- Additional comments from [email protected] Thu Jan 7 15:09:48 +0000 2010 ------- . Each time when a SdDrawDocument object is created, it will create a SdStyleSheetPool object, in SdDrawDocument constructor method, SdDrawDocument::SdDrawDocument() { ... pItemPool->SetDefaultMetric(SFX_MAPUNIT_100TH_MM); pItemPool->FreezeIdRanges(); SetTextDefaults(); // die DrawingEngine muss auch wissen, wo er ist FmFormModel::SetStyleSheetPool( new SdStyleSheetPool( GetPool(), this ) ); ... } and in SdMasterPagesAccess::insertNewByIndex( ){ // created many style sheet objects in the pool ... // create styles ((SdStyleSheetPool*)mpDoc->GetStyleSheetPool())->CreateLayoutStyleSheets( aPrefix ); ... } 2 . in destructor method, SdDrawDocument::~SdDrawDocument()->FmFormModel::~FmFormModel()->SdrModel::~SdrModel() in file svx\source\svdraw\svdmodel.cxx, API SdrModel::~SdrModel(){ ... // delete StyleSheetPool, derived classes should not do this since // the DrawingEngine may need it in its destrctor (SB) if( mxStyleSheetPool.is() ) { Reference< XComponent > xComponent( dynamic_cast< cppu::OWeakObject* >( mxStyleSheetPool.get() ), UNO_QUERY ); if( xComponent.is() ) try { xComponent->dispose(); } catch( RuntimeException& ) { } mxStyleSheetPool.clear(); } ... } But unfortunately above piece of code in fact doesn't release the StyleSheetPool() object because mxStyleSheetPool's reference count is not reset. This pool object and all StyleSheet objects put inside it are all leaked. --------------------------------------------------------------------- Please do not reply to this automatically generated notification from Issue Tracker. Please log onto the website and enter your comments. http://qa.openoffice.org/issue_handling/project_issues.html#notification --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
