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 : 15 fPartition(partition), 16 fChild(child) 17 { 18 if (fPartition) 19 fPartition->AcquireReference(); 20 21 if (fChild) 22 fChild->AcquireReference(); 23 } 24 25 26 // destructor 27 DiskDeviceJob::~DiskDeviceJob() 28 { 29 if (fPartition) 30 fPartition->ReleaseReference(); 31 32 if (fChild) 33 fChild->ReleaseReference(); 34 } 35