本文整理汇总了C++中ObjList::destruct方法的典型用法代码示例。如果您正苦于以下问题:C++ ObjList::destruct方法的具体用法?C++ ObjList::destruct怎么用?C++ ObjList::destruct使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ObjList
的用法示例。
在下文中一共展示了ObjList::destruct方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: remove
GenObject* ObjList::remove(bool delobj)
{
GenObject *tmp = m_obj;
if (m_next) {
ObjList *n = m_next;
m_next = n->next();
m_obj = n->get();
m_delete = n->m_delete;
n->m_obj = 0;
n->m_next = 0;
n->destruct();
}
else
m_obj = 0;
if (delobj && tmp) {
XDebug(DebugInfo,"ObjList::remove() deleting %p",tmp);
// Don't use TelEngine::destruct(): the compiler will call the non-template
// function (which doesn't reset the pointer)
tmp->destruct();
tmp = 0;
}
return tmp;
}
示例2: XDebug
NamedList& NamedList::copyParams(const NamedList& original, const String& list, char childSep)
{
XDebug(DebugInfo,"NamedList::copyParams(%p,\"%s\",'%.1s') [%p]",
&original,list.c_str(),&childSep,this);
ObjList* l = list.split(',',false);
if (l) {
copyParams(original,l,childSep);
l->destruct();
}
return *this;
}
示例3: remove
GenObject* ObjList::remove(bool delobj)
{
GenObject *tmp = m_obj;
if (m_next) {
ObjList *n = m_next;
m_next = n->next();
m_obj = n->get();
m_delete = n->m_delete;
n->m_obj = 0;
n->m_next = 0;
n->destruct();
}
else
m_obj = 0;
if (delobj && tmp) {
XDebug(DebugInfo,"ObjList::remove() deleting %p",tmp);
TelEngine::destruct(tmp);
}
return tmp;
}