Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | There is always one sd::framework::FrameworkHelper object object not released when open a sd document | ||||||
---|---|---|---|---|---|---|---|
Product: | Impress | Reporter: | zhang jianfang <zhangjf> | ||||
Component: | code | Assignee: | zhang jianfang <zhangjf> | ||||
Status: | CLOSED FIXED | QA Contact: | |||||
Severity: | Normal | ||||||
Priority: | P3 | ||||||
Version: | 4.0.0-dev | ||||||
Target Milestone: | 4.0.0 | ||||||
Hardware: | All | ||||||
OS: | All | ||||||
Issue Type: | DEFECT | Latest Confirmation in: | --- | ||||
Developer Difficulty: | --- | ||||||
Issue Depends on: | |||||||
Issue Blocks: | 120975 | ||||||
Attachments: |
|
Description
zhang jianfang
2012-08-23 07:55:28 UTC
Created attachment 79089 [details]
sd.FrameworkHelper.cxx.patch
SdGlobalResourceContainer is designed for controling the lifetime of some singleton objects (See comments in file sd\inc\sdmod.hxx). But FrameworkHelper is not a singleton object, for each document/shell, it creates one object (see sd::ViewShellBase::GetMainViewShell() api). It is meaningless to put the created FrameworkHelper object into SdGlobalResourceContainer but memory leak.
FrameworkHelper class keeps it's own static maInstanceMap list to keep the created objects, when an object are safe to be destroyed, it is removed from maInstanceMap list in API FrameworkHelper::ReleaseInstance().
So it is safe not to to put the created FrameworkHelper object into SdGlobalResourceContainer.
"zhangjf" committed SVN revision 1380959 into trunk: #i120677#, prevent putting non singleton object FrameworkHelper into SdGlobal... Change to resolved state |