本文整理汇总了C++中delete2函数的典型用法代码示例。如果您正苦于以下问题:C++ delete2函数的具体用法?C++ delete2怎么用?C++ delete2使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了delete2函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: saveList
ShopWindow::~ShopWindow()
{
saveList();
delete2(mBuyShopItemList);
delete2(mSellShopItemList);
delete2(mBuyShopItems);
delete2(mSellShopItems);
delete2(mTradeItem);
instances.remove(this);
}
示例2: main
void main()
{
int c;
do
{
printf("\n---MENU---");
printf("\n1.Push");
printf("\n2.Pop");
printf("\n3.Display");
printf("\n4.Exit");
printf("\nEnter your choice : ");
scanf("%d",&c);
switch(c)
{
case 1:
insert1();
break;
case 2:
delete2();
break;
case 3:
display();
break;
case 4:
exit(0);
default:
printf("\nEnter a valid choice");
}
}while(c!=4);
getch();
}
示例3: delete2
TextChunk::~TextChunk()
{
delete2(img);
#ifdef UNITTESTS
textChunkCnt --;
#endif
}
示例4: delete2
CharCreateDialog::~CharCreateDialog()
{
delete2(mPlayer);
if (charServerHandler)
charServerHandler->setCharCreateDialog(nullptr);
}
示例5: delete2
ProgressIndicator::~ProgressIndicator()
{
if (gui != nullptr)
gui->removeDragged(this);
delete2(mIndicator);
}
示例6: port
void IPC::start()
{
if (ipc)
return;
unsigned short port(44007);
if (getenv("IPC_PORT"))
port = atoi(getenv("IPC_PORT"));
logger->log("Starting IPC...");
ipc = new IPC;
for (int f = port; f < 65535; f ++)
{
ipc->setPort(f);
logger->log(" -> trying port %d...", f);
if (ipc->init())
{
logger->log(" -> Port %d selected", f);
return;
}
else
{
port ++;
}
}
delete2(ipc);
}
示例7: clear
Particle::~Particle()
{
if (mActor != BeingId_zero &&
(actorManager != nullptr))
{
ActorSprite *const actor = actorManager->findActor(mActor);
if (actor != nullptr)
actor->controlParticleDeleted(this);
}
// Delete child emitters and child particles
clear();
delete2(mAnimation);
if (mImage != nullptr)
{
if (mType == ParticleType::Image)
{
const std::string &restrict name = mImage->mIdPath;
StringIntMapIter it
= ImageParticle::imageParticleCountByName.find(name);
if (it != ImageParticle::imageParticleCountByName.end())
{
int &cnt = (*it).second;
if (cnt > 0)
cnt --;
}
mImage->decRef();
}
mImage = nullptr;
}
ParticleEngine::particleCount--;
}
示例8: delete2
void IPC::stop()
{
if (!ipc)
return;
logger->log("Stopping IPC...");
delete2(ipc);
}
示例9: deleteMapImage
Minimap::~Minimap()
{
config.setValue(getWindowName() + "Show", mShow);
config.removeListeners(this);
CHECKLISTENERS
deleteMapImage();
delete2(mTextPopup);
}
示例10: uninstallActionListeners
GuiTable::~GuiTable()
{
if (gui)
gui->removeDragged(this);
uninstallActionListeners();
delete2(mModel);
}
示例11: delete2
ServerDialog::~ServerDialog()
{
if (mDownload)
{
mDownload->cancel();
delete2(mDownload)
}
delete2(mServersListModel);
}
示例12: delete2
SimpleAnimation::~SimpleAnimation()
{
delete2(mAnimation);
if (mImageSet)
{
mImageSet->decRef();
mImageSet = nullptr;
}
}
示例13: delete2
void Inventory::removeItemAt(const int index)
{
delete2(mItems[index]);
mUsed--;
if (mUsed < 0) // Already at 0, no need to distribute event
mUsed = 0;
else
distributeSlotsChangedEvent();
}
示例14: delete2
MiniStatusWindow::~MiniStatusWindow()
{
delete2(mTextPopup);
delete2(mStatusPopup);
delete_all(mIcons);
mIcons.clear();
Inventory *const inv = PlayerInfo::getInventory();
if (inv)
inv->removeInventoyListener(this);
FOR_EACH (ProgressBarVectorCIter, it, mBars)
{
ProgressBar *bar = *it;
if (!bar)
continue;
if (!bar->isVisibleLocal())
delete bar;
}
示例15: delete2
void rSdpaLib::Delete()
{
delete2();
#if 0
// bLOCKsTRUCT cannot release successfully
if (bLOCKsTRUCT) {
delete[] bLOCKsTRUCT;
}
bLOCKsTRUCT = NULL;
#endif
}