21#include <com/sun/star/uno/Reference.h>
22#include <com/sun/star/lang/XComponent.hpp>
26template <
class T>
void Dispose(
const T& xInterface)
28 css::uno::Reference<css::lang::XComponent> xComponent(xInterface, css::uno::UNO_QUERY);
30 xComponent->dispose();
35 Dispose<css::uno::Reference<T>>(rInterface);
36 rInterface.set(
nullptr);
41 for (
const auto& rElement : rContainer)
43 Dispose<typename Container::value_type>(rElement);
void Dispose(const T &xInterface)
void DisposeAndClear(css::uno::Reference< T > &rInterface)
void DisposeAllElements(Container &rContainer)