Kaydet (Commit) 5794beab authored tarafından Noel Grandin's avatar Noel Grandin

use rtl::Reference in QuitGuard

instead of storing both a raw pointer and an uno::Reference

Change-Id: Ib70bf9508210b2a58dd65437c6cbe8f4f5b343fc
üst 7832911d
...@@ -859,19 +859,17 @@ namespace svxform ...@@ -859,19 +859,17 @@ namespace svxform
} }
}; };
TerminateListener* mpListener; rtl::Reference<TerminateListener> mxListener;
css::uno::Reference<css::frame::XTerminateListener> mxLifeCycle;
public: public:
QuitGuard() QuitGuard()
: mpListener(new TerminateListener) : mxListener(new TerminateListener)
, mxLifeCycle(mpListener)
{ {
mpListener->start(); mxListener->start();
} }
~QuitGuard() ~QuitGuard()
{ {
mpListener->stop(); mxListener->stop();
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment