In message "Re: [dev] rtl::Reference vs. [com::sun::star::]uno::References",
Stephan Bergmann wrote...
 >Philipp Lohmann wrote:
 >> Hi,
 >> 
 >> regarding that example I would normally do
 >> 
 >> Something* pS = new Something();
 >> css::uno::Reference<XSomething> x( pS );
 >> pS->privateNonUnoFunction();
 >
 >I would consider the approach I showed below more robust (code that can 
 >throw slipping in between the first two lines, someone removing the 
 >second line out of ignorance, ...).
+1

I think it is easier to make it guarantee exception handling.

 >
 >-Stephan
 >
 >>>   class Something: public cppu::WeakImplHelper1<XSomething> { ... };
 >>>   rtl::Reference<Something> s(new Something);
 >>>   s->privateNonUnoFunction();
 >>>   css::uno::Reference<XSomething> x(s.get());
 >>>
 >>> etc.
 >
 >---------------------------------------------------------------------
 >To unsubscribe, e-mail: [EMAIL PROTECTED]
 >For additional commands, e-mail: [EMAIL PROTECTED]
 >

----
 Takashi Ono(HK Freak)
 mailto:[EMAIL PROTECTED] or [EMAIL PROTECTED]
        (Personal Address, checked every morning/evening and holidays)
 mailto:[EMAIL PROTECTED]
        (Address for business, checked every working days)
 http://www.hkfreak.net

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to