Resolved TODO: made TeamMemory and TeamTypeInformation BReferenceable.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42359 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2011-07-01 21:40:32 +00:00
parent 716e16d4c3
commit 8ac3d9fe39
4 changed files with 9 additions and 5 deletions
+1 -2
View File
@@ -33,8 +33,7 @@ class SourceLocation;
class SpecificTeamDebugInfo; class SpecificTeamDebugInfo;
class TeamDebugInfo : public BReferenceable, public GlobalTypeLookup, class TeamDebugInfo : public GlobalTypeLookup, public TeamTypeInformation {
public TeamTypeInformation {
public: public:
TeamDebugInfo( TeamDebugInfo(
DebuggerInterface* debuggerInterface, DebuggerInterface* debuggerInterface,
+3 -1
View File
@@ -6,13 +6,15 @@
#define TEAM_MEMORY_H #define TEAM_MEMORY_H
#include <Referenceable.h>
#include "TargetAddressRange.h" #include "TargetAddressRange.h"
class BString; class BString;
class TeamMemory { class TeamMemory : public BReferenceable {
public: public:
virtual ~TeamMemory(); virtual ~TeamMemory();
@@ -15,7 +15,7 @@ class Type;
class TypeLookupConstraints; class TypeLookupConstraints;
class TeamTypeInformation { class TeamTypeInformation : public BReferenceable {
public: public:
virtual ~TeamTypeInformation(); virtual ~TeamTypeInformation();
+4 -1
View File
@@ -25,8 +25,9 @@ ValueLoader::ValueLoader(Architecture* architecture, TeamMemory* teamMemory,
fTypeInformation(typeInformation), fTypeInformation(typeInformation),
fCpuState(cpuState) fCpuState(cpuState)
{ {
// TODO: TeamMemory is not BReferenceable!
fArchitecture->AcquireReference(); fArchitecture->AcquireReference();
fTeamMemory->AcquireReference();
fTypeInformation->AcquireReference();
if (fCpuState != NULL) if (fCpuState != NULL)
fCpuState->AcquireReference(); fCpuState->AcquireReference();
} }
@@ -35,6 +36,8 @@ ValueLoader::ValueLoader(Architecture* architecture, TeamMemory* teamMemory,
ValueLoader::~ValueLoader() ValueLoader::~ValueLoader()
{ {
fArchitecture->ReleaseReference(); fArchitecture->ReleaseReference();
fTeamMemory->ReleaseReference();
fTypeInformation->ReleaseReference();
if (fCpuState != NULL) if (fCpuState != NULL)
fCpuState->ReleaseReference(); fCpuState->ReleaseReference();
} }