Add copy constructor to ValueLoader.

git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@42361 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Rene Gollent
2011-07-01 21:45:44 +00:00
parent 96893f28cc
commit e466360263
2 changed files with 16 additions and 0 deletions
+15
View File
@@ -33,6 +33,21 @@ ValueLoader::ValueLoader(Architecture* architecture, TeamMemory* teamMemory,
}
ValueLoader::ValueLoader(const ValueLoader& other)
:
fArchitecture(other.fArchitecture),
fTeamMemory(other.fTeamMemory),
fTypeInformation(other.fTypeInformation),
fCpuState(other.fCpuState)
{
fArchitecture->AcquireReference();
fTeamMemory->AcquireReference();
fTypeInformation->AcquireReference();
if (fCpuState != NULL)
fCpuState->AcquireReference();
}
ValueLoader::~ValueLoader()
{
fArchitecture->ReleaseReference();
+1
View File
@@ -27,6 +27,7 @@ public:
TeamTypeInformation* typeInformation,
CpuState* cpuState);
// cpuState can be NULL
ValueLoader(const ValueLoader& other);
~ValueLoader();
Architecture* GetArchitecture() const