incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 120677] There is always one sd::framework::FrameworkHelper object object not released when open a sd document
Date Thu, 23 Aug 2012 08:09:51 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=120677

zhang jianfang <zhangjf@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
  Attachment #79089|                            |review?
              Flags|                            |

--- Comment #1 from zhang jianfang <zhangjf@apache.org> ---
Created attachment 79089
  --> https://issues.apache.org/ooo/attachment.cgi?id=79089&action=edit
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.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message