From 47231b67f16c39a979eadb64ac76cf44369a2b4d Mon Sep 17 00:00:00 2001 From: dwyip Date: Tue, 4 Jul 2006 20:35:26 +0000 Subject: [PATCH] switched UndoStackObserver / CompositeUndoStackObserver to use GC managed memory. Initial tests seem to check out okay --- src/composite-undo-stack-observer.h | 6 ++++-- src/undo-stack-observer.h | 4 +++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/src/composite-undo-stack-observer.h b/src/composite-undo-stack-observer.h index 02d54eb76..7b6b693b6 100644 --- a/src/composite-undo-stack-observer.h +++ b/src/composite-undo-stack-observer.h @@ -14,6 +14,8 @@ #ifndef __COMPOSITE_UNDO_COMMIT_OBSERVER_H__ #define __COMPOSITE_UNDO_COMMIT_OBSERVER_H__ +#include "gc-alloc.h" +#include "gc-managed.h" #include "undo-stack-observer.h" #include @@ -32,7 +34,7 @@ public: /** * Structure for tracking UndoStackObservers. */ - struct UndoStackObserverRecord { + struct UndoStackObserverRecord : public GC::Managed<> { public: /** * Constructor. @@ -88,7 +90,7 @@ public: }; /// A list of UndoStackObserverRecords, used to aggregate multiple UndoStackObservers. - typedef std::list< UndoStackObserverRecord > UndoObserverRecordList; + typedef std::list< UndoStackObserverRecord, GC::Alloc< UndoStackObserverRecord, GC::MANUAL > > UndoObserverRecordList; /** * Constructor. diff --git a/src/undo-stack-observer.h b/src/undo-stack-observer.h index cd17c4675..dbda2b980 100644 --- a/src/undo-stack-observer.h +++ b/src/undo-stack-observer.h @@ -14,6 +14,8 @@ #ifndef __UNDO_COMMIT_OBSERVER_H__ #define __UNDO_COMMIT_OBSERVER_H__ +#include "gc-managed.h" + namespace Inkscape { class Event; @@ -32,7 +34,7 @@ class Event; * UndoStackObservers should not be used on their own. Instead, they should be registered * with a CompositeUndoStackObserver. */ -class UndoStackObserver { +class UndoStackObserver : public GC::Managed<> { public: UndoStackObserver() { } virtual ~UndoStackObserver() { } -- 2.39.5