diff options
author | Daniel Boelzle <dbo@openoffice.org> | 2001-10-16 10:53:29 +0000 |
---|---|---|
committer | Daniel Boelzle <dbo@openoffice.org> | 2001-10-16 10:53:29 +0000 |
commit | cc91a6f9d6e747d00b33501508e6d7b01af81fd7 (patch) | |
tree | 459172d3b2424aadffed4dda5e432c34139188f7 /cppuhelper/test/cfg_test.cxx | |
parent | bc76f148d9afe60acf8ea6ec9a7105e0f34ca9ea (diff) |
disposing context
Diffstat (limited to 'cppuhelper/test/cfg_test.cxx')
-rw-r--r-- | cppuhelper/test/cfg_test.cxx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/cppuhelper/test/cfg_test.cxx b/cppuhelper/test/cfg_test.cxx index 4b7e5386a2f6..581ed6f213fa 100644 --- a/cppuhelper/test/cfg_test.cxx +++ b/cppuhelper/test/cfg_test.cxx @@ -2,9 +2,9 @@ * * $RCSfile: cfg_test.cxx,v $ * - * $Revision: 1.1 $ + * $Revision: 1.2 $ * - * last change: $Author: dbo $ $Date: 2001-10-11 14:40:44 $ + * last change: $Author: dbo $ $Date: 2001-10-16 11:53:29 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -74,6 +74,7 @@ #include <com/sun/star/lang/XMultiComponentFactory.hpp> #include <com/sun/star/lang/XInitialization.hpp> #include <com/sun/star/lang/XServiceInfo.hpp> +#include <com/sun/star/lang/XComponent.hpp> #include <com/sun/star/registry/XImplementationRegistration.hpp> @@ -315,6 +316,11 @@ int SAL_CALL main( int argc, char const * argv[] ) OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent0"), xContext )).is() ); OSL_VERIFY( (x = xMgr->createInstanceWithContext( OUSTR("com.sun.star.bootstrap.TestComponent1"), xContext )).is() ); + Reference< lang::XComponent > xComp( xContext, UNO_QUERY ); + if (xComp.is()) + { + xComp->dispose(); + } return 0; } catch (Exception & exc) |