本文整理汇总了C++中PClass::DestroySpecials方法的典型用法代码示例。如果您正苦于以下问题:C++ PClass::DestroySpecials方法的具体用法?C++ PClass::DestroySpecials怎么用?C++ PClass::DestroySpecials使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PClass
的用法示例。
在下文中一共展示了PClass::DestroySpecials方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: GetClass
DObject::~DObject ()
{
if (!PClass::bShutdown)
{
PClass *type = GetClass();
if (!(ObjectFlags & OF_Cleanup) && !PClass::bShutdown)
{
DObject **probe;
if (!(ObjectFlags & OF_YesReallyDelete))
{
Printf("Warning: '%s' is freed outside the GC process.\n",
type != NULL ? type->TypeName.GetChars() : "==some object==");
}
// Find all pointers that reference this object and NULL them.
StaticPointerSubstitution(this, NULL);
// Now unlink this object from the GC list.
for (probe = &GC::Root; *probe != NULL; probe = &((*probe)->ObjNext))
{
if (*probe == this)
{
*probe = ObjNext;
if (&ObjNext == GC::SweepPos)
{
GC::SweepPos = probe;
}
break;
}
}
// If it's gray, also unlink it from the gray list.
if (this->IsGray())
{
for (probe = &GC::Gray; *probe != NULL; probe = &((*probe)->GCNext))
{
if (*probe == this)
{
*probe = GCNext;
break;
}
}
}
}
if (nullptr != type)
{
type->DestroySpecials(this);
}
}
}