summaryrefslogtreecommitdiff
path: root/indra/newview/llchannelmanager.cpp
diff options
context:
space:
mode:
authorMichael Pohoreski <ptolemy@lindenlab.com>2019-11-20 17:10:22 -0800
committerMichael Pohoreski <ptolemy@lindenlab.com>2019-11-20 17:10:22 -0800
commit4b205db468fd371dfe1bb30bb887e2ccbd7044ec (patch)
tree6d83efd5ebc0c2a462f33f1b385c5b415a93cb49 /indra/newview/llchannelmanager.cpp
parent18eb8ac90ce409ba620f6fe8ff487e6195d9c3eb (diff)
parent24920de799c8e2dd26854923c7a10fc4a551dd5d (diff)
Merged lindenlab/viewer-eep into default
Diffstat (limited to 'indra/newview/llchannelmanager.cpp')
-rw-r--r--indra/newview/llchannelmanager.cpp21
1 files changed, 14 insertions, 7 deletions
diff --git a/indra/newview/llchannelmanager.cpp b/indra/newview/llchannelmanager.cpp
index d6240838b6..0b7b9cbbc7 100644
--- a/indra/newview/llchannelmanager.cpp
+++ b/indra/newview/llchannelmanager.cpp
@@ -58,15 +58,22 @@ LLChannelManager::LLChannelManager()
//--------------------------------------------------------------------------
LLChannelManager::~LLChannelManager()
{
- for(std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
- {
- LLScreenChannelBase* channel = it->channel.get();
- if (!channel) continue;
+}
- delete channel;
- }
+//--------------------------------------------------------------------------
+void LLChannelManager::cleanupSingleton()
+{
+ // Note: LLScreenChannelBase is a LLUICtrl and depends onto other singletions
+ // not captured by singleton-dependency, so cleanup it here instead of destructor
+ for (std::vector<ChannelElem>::iterator it = mChannelList.begin(); it != mChannelList.end(); ++it)
+ {
+ LLScreenChannelBase* channel = it->channel.get();
+ if (!channel) continue;
- mChannelList.clear();
+ delete channel;
+ }
+
+ mChannelList.clear();
}
//--------------------------------------------------------------------------