1 /* 2 * Copyright 2007, Ingo Weinhold, ingo_weinhold@gmx.de. 3 * Distributed under the terms of the MIT License. 4 */ 5 6 #include "DiskDeviceJob.h" 7 8 #include "PartitionReference.h" 9 10 11 // constructor 12 DiskDeviceJob::DiskDeviceJob(PartitionReference* partition, 13 PartitionReference* child) 14 : fPartition(partition), 15 fChild(child) 16 { 17 if (fPartition) 18 fPartition->AddReference(); 19 20 if (fChild) 21 fChild->AddReference(); 22 } 23 24 25 // destructor 26 DiskDeviceJob::~DiskDeviceJob() 27 { 28 if (fPartition) 29 fPartition->RemoveReference(); 30 31 if (fChild) 32 fChild->RemoveReference(); 33 } 34