Re: changing the UNO dispose/disposing() protocol ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 5/28/23 16:02, Noel Grandin wrote:
Specifically, I would like to change the part where if a component is already disposed, it throws a DisposedException. Instead it should simply ignore the call (i.e. return early)

The documentation of css.lang.XComponent::dispose at udkapi/com/sun/star/lang/XComponent.idl states

        <p>After this method has been called, the object should behave as passive
        as possible, thus it should ignore all calls
        in case it can comply with its specification (for instance addEventListener()).
        Often the object can't fulfill its specification anymore,
        in this case it must throw the DisposedException
        (which is derived from com::sun::star::uno::RuntimeException)
        when it gets called.</p>

        <p>For some objects no real owner can be identified, thus it can be
        disposed from multiple reference holders. In this case
        the object should be able to cope with multiple dispose()-calls (which
        are inevitable in a multithreaded environment).

This does not encourage implementations of XComponent to throw DisposedException upon repeated calls to dispose, anyway.




[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux