diff options
author | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-14 23:46:15 +0200 |
---|---|---|
committer | AndreyL ProductEngine <alihatskiy@productengine.com> | 2019-11-14 23:46:15 +0200 |
commit | 4b261a90ae3dead0a1fa843268bae0fda710648b (patch) | |
tree | 152732b57c90bc23e4893092212a04feff281de5 /indra/newview/llchannelmanager.cpp | |
parent | 26732bc576f86fde532e1f9448bd127515f70612 (diff) | |
parent | 78bdf57ad6610b34389226bf941ba736ca0c2225 (diff) |
Merged in lindenlab/viewer-release
Diffstat (limited to 'indra/newview/llchannelmanager.cpp')
-rw-r--r-- | indra/newview/llchannelmanager.cpp | 21 |
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(); } //-------------------------------------------------------------------------- |