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