From 67df8eb23b9f74d1368b0aff430f9423883a320d Mon Sep 17 00:00:00 2001 From: David Yip Date: Tue, 4 Jul 2006 20:35:26 +0000 Subject: switched UndoStackObserver / CompositeUndoStackObserver to use GC managed memory. Initial tests seem to check out okay (bzr r1352) --- 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() { } -- cgit v1.2.3