本文整理汇总了C++中DEVICE::term方法的典型用法代码示例。如果您正苦于以下问题:C++ DEVICE::term方法的具体用法?C++ DEVICE::term怎么用?C++ DEVICE::term使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DEVICE
的用法示例。
在下文中一共展示了DEVICE::term方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: term
/*
* Free memory allocated for the device
*/
void DEVICE::term(void)
{
DEVICE *dev = NULL;
Dmsg1(900, "term dev: %s\n", print_name());
close();
if (dev_name) {
free_memory(dev_name);
dev_name = NULL;
}
if (prt_name) {
free_memory(prt_name);
prt_name = NULL;
}
if (errmsg) {
free_pool_memory(errmsg);
errmsg = NULL;
}
pthread_mutex_destroy(&m_mutex);
pthread_cond_destroy(&wait);
pthread_cond_destroy(&wait_next_vol);
pthread_mutex_destroy(&spool_mutex);
pthread_mutex_destroy(&freespace_mutex);
if (attached_dcrs) {
delete attached_dcrs;
attached_dcrs = NULL;
}
/* We let the DEVRES pointer if not our device */
if (device && device->dev == this) {
device->dev = NULL;
}
delete this;
if (dev) {
dev->term();
}
}