From 8ac3d9fe3951a9c7774c692f88426709efc067d8 Mon Sep 17 00:00:00 2001 From: Rene Gollent Date: Fri, 1 Jul 2011 21:40:32 +0000 Subject: [PATCH] Resolved TODO: made TeamMemory and TeamTypeInformation BReferenceable. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42359 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/debugger/debug_info/TeamDebugInfo.h | 3 +-- src/apps/debugger/model/TeamMemory.h | 4 +++- src/apps/debugger/model/TeamTypeInformation.h | 2 +- src/apps/debugger/value/ValueLoader.cpp | 5 ++++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/src/apps/debugger/debug_info/TeamDebugInfo.h b/src/apps/debugger/debug_info/TeamDebugInfo.h index c4411a49be..d267f5db7f 100644 --- a/src/apps/debugger/debug_info/TeamDebugInfo.h +++ b/src/apps/debugger/debug_info/TeamDebugInfo.h @@ -33,8 +33,7 @@ class SourceLocation; class SpecificTeamDebugInfo; -class TeamDebugInfo : public BReferenceable, public GlobalTypeLookup, - public TeamTypeInformation { +class TeamDebugInfo : public GlobalTypeLookup, public TeamTypeInformation { public: TeamDebugInfo( DebuggerInterface* debuggerInterface, diff --git a/src/apps/debugger/model/TeamMemory.h b/src/apps/debugger/model/TeamMemory.h index e1a391683a..6790704e1c 100644 --- a/src/apps/debugger/model/TeamMemory.h +++ b/src/apps/debugger/model/TeamMemory.h @@ -6,13 +6,15 @@ #define TEAM_MEMORY_H +#include + #include "TargetAddressRange.h" class BString; -class TeamMemory { +class TeamMemory : public BReferenceable { public: virtual ~TeamMemory(); diff --git a/src/apps/debugger/model/TeamTypeInformation.h b/src/apps/debugger/model/TeamTypeInformation.h index 929d1acbe0..3f6b25e613 100644 --- a/src/apps/debugger/model/TeamTypeInformation.h +++ b/src/apps/debugger/model/TeamTypeInformation.h @@ -15,7 +15,7 @@ class Type; class TypeLookupConstraints; -class TeamTypeInformation { +class TeamTypeInformation : public BReferenceable { public: virtual ~TeamTypeInformation(); diff --git a/src/apps/debugger/value/ValueLoader.cpp b/src/apps/debugger/value/ValueLoader.cpp index 52d3e00028..d049bceda3 100644 --- a/src/apps/debugger/value/ValueLoader.cpp +++ b/src/apps/debugger/value/ValueLoader.cpp @@ -25,8 +25,9 @@ ValueLoader::ValueLoader(Architecture* architecture, TeamMemory* teamMemory, fTypeInformation(typeInformation), fCpuState(cpuState) { -// TODO: TeamMemory is not BReferenceable! fArchitecture->AcquireReference(); + fTeamMemory->AcquireReference(); + fTypeInformation->AcquireReference(); if (fCpuState != NULL) fCpuState->AcquireReference(); } @@ -35,6 +36,8 @@ ValueLoader::ValueLoader(Architecture* architecture, TeamMemory* teamMemory, ValueLoader::~ValueLoader() { fArchitecture->ReleaseReference(); + fTeamMemory->ReleaseReference(); + fTypeInformation->ReleaseReference(); if (fCpuState != NULL) fCpuState->ReleaseReference(); }