You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/08/29 08:38:30 UTC
[Bug 120746] New: The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
https://issues.apache.org/ooo/show_bug.cgi?id=120746
Priority: P3
Bug ID: 120746
Assignee: ooo-issues@incubator.apache.org
Summary: The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
Severity: normal
Issue Type: DEFECT
Classification: Code
OS: All
Reporter: zhangjf@apache.org
Hardware: All
Status: CONFIRMED
Version: AOO 3.4.0
Component: code
Product: performance
In FmXUndoEnvironment ctor, it calls
m_pScriptingEnv( ::svxform::createDefaultFormScriptingEnvironment( _rModel )
)
creates a FormScriptingEnvironment object.
And in svxform::FormScriptingEnvironment ctor api, it creates
ListenerImplementation object,
FormScriptingEnvironment::FormScriptingEnvironment( FmFormModel& _rModel )
:m_refCount( 0 )
,m_pScriptListener( NULL )
,m_rFormModel( _rModel )
,m_bDisposed( false )
{
m_pScriptListener = ListenerImplementation( new FormScriptListener(
this ) );
// note that this is a cyclic reference between the FormScriptListener
and the FormScriptingEnvironment
// This cycle is broken up when our instance is disposed.
}
So there is cyclic reference between FormScriptingEnvironment and
ListenerImplementation object. It needs call to it's
FormScriptingEnvironment::dispose() api to break the cyclic reference before it
can be released.
But before FmXUndoEnvironment::~FmXUndoEnvironment() is called,
FmXUndoEnvironment::dispose() is not never called, so the
svxform::FormScriptingEnvironment object get leaked.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120746] The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120746
--- Comment #2 from SVN Robot <sv...@dev.null.org> ---
"zhangjf" committed SVN revision 1380986 into trunk:
#i120746#, the FormScriptingEnvironment object created in the
FmXUndoEnvironm...
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120746] The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120746
zhang jianfang <zh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|CONFIRMED |RESOLVED
Resolution|--- |FIXED
--- Comment #3 from zhang jianfang <zh...@apache.org> ---
Change to resolved state
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120746] The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120746
zhang jianfang <zh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Attachment #79208| |review?
Flags| |
--- Comment #1 from zhang jianfang <zh...@apache.org> ---
Created attachment 79208
--> https://issues.apache.org/ooo/attachment.cgi?id=79208&action=edit
fix code patch
Because FmXUndoEnvironment::dispose() is not a public API and it does call to
FmXUndoEnvironment::dispose(). we can not depend on it. The proposed fix is
just to call FmXUndoEnvironment::dispose() in FmXUndoEnvironment dtor api.
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 120746] The FormScriptingEnvironment object created in the
FmXUndoEnvironment ctor is never released
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=120746
zhang jianfang <zh...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Assignee|ooo-issues@incubator.apache |zhangjf@apache.org
|.org |
--
You are receiving this mail because:
You are the assignee for the bug.