本文整理匯總了C++中DeletePointer函數的典型用法代碼示例。如果您正苦於以下問題:C++ DeletePointer函數的具體用法?C++ DeletePointer怎麽用?C++ DeletePointer使用的例子?那麽, 這裏精選的函數代碼示例或許可以為您提供幫助。
在下文中一共展示了DeletePointer函數的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C++代碼示例。
示例1: lock
//virtual
void LLConsole::clear()
{
mTimer.reset();
LLMutexLock lock(&mQueueMutex);
std::for_each(mParagraphs.begin(), mParagraphs.end(), DeletePointer());
mParagraphs.clear();
std::for_each(mNewParagraphs.begin(), mNewParagraphs.end(), DeletePointer());
mNewParagraphs.clear();
}
示例2: DeletePointer
////-----------------
/// FFMultiSet::clear
//---------------------
// Cleans up.
//
void FFMultiSet::clear()
{
mConfig = NULL;
for
( int i = 0
; i < mSet.size()
; i++
){
DeletePointer( mSet[ i ] );
}
mSet.clear();
DeletePointer( mDevices );
}
示例3: DeletePointer
// Destroys the object
LLFloaterPay::~LLFloaterPay()
{
std::for_each(mCallbackData.begin(), mCallbackData.end(), DeletePointer());
// Clean up if we are still waiting for a name.
gCacheName->cancelCallback(mTargetUUID,onCacheOwnerName,this);
}
示例4: disconnectAllNeighbors
LLViewerRegion::~LLViewerRegion()
{
if(mHttpResponderPtr)
{
(static_cast<BaseCapabilitiesComplete*>(mHttpResponderPtr.get()))->setRegion(NULL) ;
}
gVLManager.cleanupData(this);
// Can't do this on destruction, because the neighbor pointers might be invalid.
// This should be reference counted...
disconnectAllNeighbors();
mCloudLayer.destroy();
LLViewerPartSim::getInstance()->cleanupRegion(this);
gObjectList.killObjects(this);
delete mCompositionp;
delete mParcelOverlay;
delete mLandp;
delete mEventPoll;
LLHTTPSender::clearSender(mHost);
saveObjectCache();
std::for_each(mObjectPartition.begin(), mObjectPartition.end(), DeletePointer());
}
示例5: DeletePointer
void LLDrawable::destroy()
{
if (gDebugGL)
{
gPipeline.checkReferences(this);
}
if (isDead())
{
sNumZombieDrawables--;
}
if (LLSpatialGroup::sNoDelete)
{
llerrs << "Illegal deletion of LLDrawable!" << llendl;
}
std::for_each(mFaces.begin(), mFaces.end(), DeletePointer());
mFaces.clear();
/*if (!(sNumZombieDrawables % 10))
{
llinfos << "- Zombie drawables: " << sNumZombieDrawables << llendl;
}*/
}
示例6: for_each
void LLXferManager::cleanup ()
{
LLXfer *xferp;
LLXfer *delp;
for_each(mOutgoingHosts.begin(), mOutgoingHosts.end(), DeletePointer());
mOutgoingHosts.clear();
delp = mSendList;
while (delp)
{
xferp = delp->mNext;
delete delp;
delp = xferp;
}
mSendList = NULL;
delp = mReceiveList;
while (delp)
{
xferp = delp->mNext;
delete delp;
delp = xferp;
}
mReceiveList = NULL;
}
示例7: for_each
LLCacheName::Impl::~Impl()
{
for_each(mCache.begin(), mCache.end(), DeletePairedPointer());
mCache.clear();
for_each(mReplyQueue.begin(), mReplyQueue.end(), DeletePointer());
mReplyQueue.clear();
}
示例8: m1
LLBufferArray::~LLBufferArray()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
delete mMutexp;
}
示例9: llassert_always
LLCurlRequest::~LLCurlRequest()
{
llassert_always(mThreadID == LLThread::currentID());
//stop all Multi handle background threads
for (curlmulti_set_t::iterator iter = mMultiSet.begin(); iter != mMultiSet.end(); ++iter)
{
LLCurl::Multi* multi = *iter;
if (multi->mThreaded)
multi->mSignal->lock();
multi->mQuitting = true;
if (multi->mThreaded)
{
while (!multi->isStopped())
{
multi->mSignal->signal();
multi->mSignal->unlock();
apr_sleep(1000);
multi->mSignal->lock();
}
}
if (multi->mThreaded)
multi->mSignal->unlock();
}
for_each(mMultiSet.begin(), mMultiSet.end(), DeletePointer());
}
示例10: llassert
LLCurl::Multi::~Multi()
{
llassert(isStopped());
if (LLCurl::sMultiThreaded)
{
LLCurl::Easy::sMultiMutex->lock();
}
delete mSignal;
mSignal = NULL;
// Clean up active
for(easy_active_list_t::iterator iter = mEasyActiveList.begin();
iter != mEasyActiveList.end(); ++iter)
{
Easy* easy = *iter;
check_curl_multi_code(curl_multi_remove_handle(mCurlMultiHandle, easy->getCurlHandle()));
delete easy;
}
mEasyActiveList.clear();
mEasyActiveMap.clear();
// Clean up freed
for_each(mEasyFreeList.begin(), mEasyFreeList.end(), DeletePointer());
mEasyFreeList.clear();
check_curl_multi_code(curl_multi_cleanup(mCurlMultiHandle));
--gCurlMultiCount;
if (LLCurl::sMultiThreaded)
{
LLCurl::Easy::sMultiMutex->unlock();
}
}
示例11: CRYPTO_set_locking_callback
void LLCurl::cleanupClass()
{
#if SAFE_SSL
CRYPTO_set_locking_callback(NULL);
for_each(sSSLMutex.begin(), sSSLMutex.end(), DeletePointer());
#endif
curl_global_cleanup();
}
示例12: DeletePointer
// Destroys the object
LLFloaterPay::~LLFloaterPay()
{
std::for_each(mCallbackData.begin(), mCallbackData.end(), DeletePointer());
// Name callbacks will be automatically disconnected since LLFloater is trackable
// In case this floater is currently waiting for a reply.
gMessageSystem->setHandlerFuncFast(_PREHASH_PayPriceReply, 0, 0);
}
示例13: DeletePointer
LLToastNotifyPanel::~LLToastNotifyPanel()
{
mButtonClickConnection.disconnect();
std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer());
mBtnCallbackData.clear();
if (mIsTip)
{
LLNotifications::getInstance()->cancel(mNotification);
}
}
示例14: DeletePointer
// virtual
LLNotifyBox::~LLNotifyBox()
{
delete mBehavior;
mBehavior = NULL;
std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer());
if (mUnique)
{
sOpenUniqueNotifyBoxes.erase(getName() + mMessage);
}
}
示例15: DeletePointer
LLToastNotifyPanel::~LLToastNotifyPanel()
{
mButtonClickConnection.disconnect();
std::for_each(mBtnCallbackData.begin(), mBtnCallbackData.end(), DeletePointer());
if (mCloseNotificationOnDestroy && LLNotificationsUtil::find(mNotification->getID()) != NULL)
{
// let reusable notification be deleted
mNotification->setReusable(false);
LLNotifications::getInstance()->cancel(mNotification);
}
}