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()); }
LLViewerRegion::~LLViewerRegion() { gVLManager.cleanupData(this); // Can't do this on destruction, because the neighbor pointers might be invalid. // This should be reference counted... disconnectAllNeighbors(); LLViewerPartSim::getInstance()->cleanupRegion(this); gObjectList.killObjects(this); delete mImpl->mCompositionp; delete mParcelOverlay; delete mImpl->mLandp; delete mImpl->mEventPoll; LLHTTPSender::clearSender(mImpl->mHost); saveObjectCache(); std::for_each(mImpl->mObjectPartition.begin(), mImpl->mObjectPartition.end(), DeletePointer()); delete mImpl; mImpl = NULL; }