Skip to content
Snippets Groups Projects
Commit 33b30fd7 authored by Andrey Kleshchev's avatar Andrey Kleshchev
Browse files

SL-15077 Mac Crash destroying LLNotificationSet

Not a fix. Mac sometimes crashes when destroying mItems in LLPersistentNotificationChannel
Decided to try cleaning mItems explicitly to see if it will change callstack, it won't fix the crash, but will help figuring out if source of the issue is in mItems or is LLPersistentNotificationChannel itself
parent 94ce4544
No related branches found
No related tags found
No related merge requests found
......@@ -27,9 +27,8 @@
// Many classes just store a single LLNotificationPtr
// and llnotifications.h is very large, so define this ligher header.
#include <boost/shared_ptr.hpp>
class LLNotification;
typedef boost::shared_ptr<LLNotification> LLNotificationPtr;
typedef std::shared_ptr<LLNotification> LLNotificationPtr;
#endif
......@@ -85,7 +85,6 @@
#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>
......@@ -304,7 +303,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 +742,10 @@ class LLNotificationChannelBase :
: mFilter(filter),
mItems()
{}
virtual ~LLNotificationChannelBase() {}
virtual ~LLNotificationChannelBase()
{
mItems.clear();
}
// you can also connect to a Channel, so you can be notified of
// changes to this channel
LLBoundListener connectChanged(const LLEventListener& slot)
......@@ -873,6 +875,7 @@ class LLNotifications :
{
LLSINGLETON(LLNotifications);
LOG_CLASS(LLNotifications);
virtual ~LLNotifications() {}
public:
......@@ -1070,7 +1073,11 @@ class LLPersistentNotificationChannel : public LLNotificationChannel
LLPersistentNotificationChannel()
: LLNotificationChannel("Persistent", "Visible", &notificationFilter)
{}
virtual ~LLPersistentNotificationChannel() {}
virtual ~LLPersistentNotificationChannel()
{
mHistory.clear();
}
typedef std::vector<LLNotificationPtr> history_list_t;
history_list_t::iterator beginHistory() { sortHistory(); return mHistory.begin(); }
......
......@@ -31,6 +31,7 @@
#include "lluictrl.h"
#include "llframetimer.h"
#include "llnotificationptr.h"
class LLViewBorder;
class LLUICtrlFactory;
......@@ -145,7 +146,7 @@ class LLMediaCtrl :
void setTextureSize(S32 width, S32 height);
void showNotification(boost::shared_ptr<class LLNotification> notify);
void showNotification(LLNotificationPtr notify);
void hideNotification();
void setTrustedContent(bool trusted);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment