diff options
author | Jörg Budischewski <jbu@openoffice.org> | 2001-07-04 13:29:29 +0000 |
---|---|---|
committer | Jörg Budischewski <jbu@openoffice.org> | 2001-07-04 13:29:29 +0000 |
commit | 80b13e9e3a681e759263ed8906df39d9be1a8fa6 (patch) | |
tree | 8dd3bfc2b546d1e481af61d882fc9707e4788c3d | |
parent | 3c89f8a71d2674f2642a160e490e0a410edb9ef5 (diff) |
#67468# added unloading support, fixed a medium memory leak
-rw-r--r-- | bridges/source/remote/urp/makefile.mk | 5 | ||||
-rw-r--r-- | bridges/source/remote/urp/urp_environment.cxx | 14 |
2 files changed, 14 insertions, 5 deletions
diff --git a/bridges/source/remote/urp/makefile.mk b/bridges/source/remote/urp/makefile.mk index 17652813e..e01b5707d 100644 --- a/bridges/source/remote/urp/makefile.mk +++ b/bridges/source/remote/urp/makefile.mk @@ -2,9 +2,9 @@ # # $RCSfile: makefile.mk,v $ # -# $Revision: 1.13 $ +# $Revision: 1.14 $ # -# last change: $Author: dbo $ $Date: 2001-04-18 12:02:47 $ +# last change: $Author: jbu $ $Date: 2001-07-04 14:29:29 $ # # The Contents of this file are made available subject to the terms of # either of the following licenses @@ -123,4 +123,5 @@ $(MISC)$/$(SHL1TARGET).def: makefile.mk @echo EXPORTS >>$@ @echo uno_initEnvironment @3 >>$@ @echo uno_ext_getMapping @4 >>$@ + @echo component_canUnload @5 >>$@ diff --git a/bridges/source/remote/urp/urp_environment.cxx b/bridges/source/remote/urp/urp_environment.cxx index 407aa6e58..999b929e8 100644 --- a/bridges/source/remote/urp/urp_environment.cxx +++ b/bridges/source/remote/urp/urp_environment.cxx @@ -2,9 +2,9 @@ * * $RCSfile: urp_environment.cxx,v $ * - * $Revision: 1.13 $ + * $Revision: 1.14 $ * - * last change: $Author: jbu $ $Date: 2001-05-14 09:57:58 $ + * last change: $Author: jbu $ $Date: 2001-07-04 14:29:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -70,6 +70,7 @@ #include <rtl/alloc.h> #include <rtl/uuid.h> +#include <rtl/unload.h> #include <uno/environment.h> #include <uno/lbnames.h> @@ -99,6 +100,7 @@ using namespace ::com::sun::star::uno; namespace bridges_urp { +rtl_StandardModuleCount g_moduleCount = MODULE_COUNT_INIT; // static void dumpProperties( struct Properties *p ) // { @@ -396,7 +398,9 @@ void RemoteEnvironment::thisDisposing( uno_Environment *pEnvRemote ) uno_threadpool_destroy( pImpl->m_hThreadPool ); + delete pImpl; pContext->aBase.release( (uno_Context * ) pContext ); + g_moduleCount.modCnt.release( &g_moduleCount.modCnt ); #ifdef DEBUG thisCounter.release(); #endif @@ -427,6 +431,7 @@ using namespace bridges_urp; extern "C" SAL_DLLEXPORT void SAL_CALL uno_initEnvironment( uno_Environment * pEnvRemote ) { + g_moduleCount.modCnt.acquire( &g_moduleCount.modCnt ); // set C-virtual methods pEnvRemote->environmentDisposing = RemoteEnvironment::thisDisposing; pEnvRemote->pExtEnv->computeObjectIdentifier = RemoteEnvironment::thisComputeObjectIdentifier; @@ -575,4 +580,7 @@ extern "C" SAL_DLLEXPORT void SAL_CALL uno_ext_getMapping( } } - +extern "C" sal_Bool SAL_CALL component_canUnload( TimeValue *pTime ) +{ + return g_moduleCount.canUnload( &g_moduleCount , pTime ); +} |