diff options
author | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-05-31 17:19:37 +0300 |
---|---|---|
committer | Andrey Kleshchev <andreykproductengine@lindenlab.com> | 2021-05-31 19:36:36 +0300 |
commit | e75519ef0e0a3b3aebf7761830b1e93163e3c673 (patch) | |
tree | d00ab38eed65bedbb247b3f4b9e6359977ec43e6 /indra/llui/llnotifications.h | |
parent | efdbaa50be7ec7ccb3359203acef30f4d15c5c19 (diff) |
SL-15093 Crash nanov2_free_to_block #2
Mostly converted some boost pointers to std ones
Made ~LLNotificationChannelBase() more explicit to get a bit more data on location of another crash that likely happens when cleaning mItems
Diffstat (limited to 'indra/llui/llnotifications.h')
-rw-r--r-- | indra/llui/llnotifications.h | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/indra/llui/llnotifications.h b/indra/llui/llnotifications.h index 2f4578da17..4287bff059 100644 --- a/indra/llui/llnotifications.h +++ b/indra/llui/llnotifications.h @@ -84,8 +84,6 @@ #include <sstream> #include <boost/utility.hpp> -#include <boost/shared_ptr.hpp> -#include <boost/enable_shared_from_this.hpp> #include <boost/type_traits.hpp> #include <boost/signals2.hpp> #include <boost/range.hpp> @@ -132,7 +130,7 @@ public: typedef boost::function<void (const LLSD&, const LLSD&)> LLNotificationResponder; -typedef boost::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr; +typedef std::shared_ptr<LLNotificationResponderInterface> LLNotificationResponderPtr; typedef LLFunctorRegistry<LLNotificationResponder> LLNotificationFunctorRegistry; typedef LLFunctorRegistration<LLNotificationResponder> LLNotificationFunctorRegistration; @@ -276,19 +274,19 @@ private: bool mInvertSetting; }; -typedef boost::shared_ptr<LLNotificationForm> LLNotificationFormPtr; +typedef std::shared_ptr<LLNotificationForm> LLNotificationFormPtr; struct LLNotificationTemplate; // we want to keep a map of these by name, and it's best to manage them // with smart pointers -typedef boost::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr; +typedef std::shared_ptr<LLNotificationTemplate> LLNotificationTemplatePtr; struct LLNotificationVisibilityRule; -typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr; +typedef std::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibilityRulePtr; /** * @class LLNotification @@ -304,7 +302,7 @@ typedef boost::shared_ptr<LLNotificationVisibilityRule> LLNotificationVisibility */ class LLNotification : boost::noncopyable, - public boost::enable_shared_from_this<LLNotification> + public std::enable_shared_from_this<LLNotification> { LOG_CLASS(LLNotification); friend class LLNotifications; @@ -743,7 +741,14 @@ public: : mFilter(filter), mItems() {} - virtual ~LLNotificationChannelBase() {} + virtual ~LLNotificationChannelBase() + { + // explicit cleanup for easier issue detection + mChanged.disconnect_all_slots(); + mPassedFilter.disconnect_all_slots(); + mFailedFilter.disconnect_all_slots(); + mItems.clear(); + } // you can also connect to a Channel, so you can be notified of // changes to this channel LLBoundListener connectChanged(const LLEventListener& slot) |