Issue 120677 - There is always one sd::framework::FrameworkHelper object object not released when open a sd document
Summary: There is always one sd::framework::FrameworkHelper object object not released...
Status: CLOSED FIXED
Alias: None
Product: Impress
Classification: Application
Component: code (show other issues)
Version: 4.0.0-dev
Hardware: All All
: P3 Normal (vote)
Target Milestone: 4.0.0
Assignee: zhang jianfang
QA Contact:
URL:
Keywords:
Depends on:
Blocks: 120975
  Show dependency tree
 
Reported: 2012-08-23 07:55 UTC by zhang jianfang
Modified: 2013-07-12 10:45 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments
sd.FrameworkHelper.cxx.patch (520 bytes, patch)
2012-08-23 08:09 UTC, zhang jianfang
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this issue.
Description zhang jianfang 2012-08-23 07:55:28 UTC
When opening a sd document, it creates a FrameworkHelper for each viewshell in api FrameworkHelper::Instance(), but it always not released when closing documents.
Comment 1 zhang jianfang 2012-08-23 08:09:51 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.
Comment 2 SVN Robot 2012-09-05 03:18:54 UTC
"zhangjf" committed SVN revision 1380959 into trunk:
#i120677#, prevent putting non singleton object FrameworkHelper into SdGlobal...
Comment 3 zhang jianfang 2012-09-05 03:19:34 UTC
Change to resolved state