summaryrefslogtreecommitdiffstats
path: root/src/ui/view/view.cpp
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <linkmauve@linkmauve.fr>2018-11-22 04:17:27 +0000
committerTavmjong Bah <tavmjong@free.fr>2018-12-03 09:35:13 +0000
commit6af653ae04272a27390821842d3e8e23c6af3efe (patch)
tree33956cb2251979c6d3b06882d858a6c36f8c5dfc /src/ui/view/view.cpp
parentAdd other sofwar binds to new keys, add missing one (diff)
downloadinkscape-6af653ae04272a27390821842d3e8e23c6af3efe.tar.gz
inkscape-6af653ae04272a27390821842d3e8e23c6af3efe.zip
Replace InkGC with std::shared_ptr for MessageStack
There are many places which still use this stack unmanaged (using desktop->getMessageStack()) but those are all leaf calls which make use of the stack and never store it anywhere, so this is fine.
Diffstat (limited to 'src/ui/view/view.cpp')
-rw-r--r--src/ui/view/view.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/ui/view/view.cpp b/src/ui/view/view.cpp
index e8c3e32db..e15ea7780 100644
--- a/src/ui/view/view.cpp
+++ b/src/ui/view/view.cpp
@@ -12,6 +12,7 @@
*/
#include <2geom/point.h>
+#include <memory>
#include "document.h"
#include "view.h"
#include "message-stack.h"
@@ -57,7 +58,7 @@ _onDocumentResized (double x, double y, View* v)
View::View()
: _doc(nullptr)
{
- _message_stack = GC::release(new Inkscape::MessageStack());
+ _message_stack = std::make_shared<Inkscape::MessageStack>();
_tips_message_context = new Inkscape::MessageContext(_message_stack);
_resized_connection = _resized_signal.connect (sigc::bind (sigc::ptr_fun (&_onResized), this));