Fennel: TempSegDestructor Class Reference (original) (raw)

Definition at line 318 of file SegmentFactory.cpp.

References Segment::getCache(), LinearDeviceSegment::getDeviceId(), ClosableObjectDestructor::operator()(), and pSegmentFactory.

00319 { 00320 LinearDeviceSegment *pLinearDeviceSegment = 00321 dynamic_cast<LinearDeviceSegment *>(pSegment); 00322 SharedCache pCache = pSegment->getCache(); 00323 DeviceId deviceId = pLinearDeviceSegment->getDeviceId(); 00324 // NOTE: pSegment and pLinearDeviceSegment are invalidated here 00325 ClosableObjectDestructor::operator()(pSegment); 00326 pCache->unregisterDevice(deviceId); 00327 pSegmentFactory->deallocateTempDeviceId(deviceId); 00328 }