From 93eaccae6fe6e8442a3c6e5a2d40a408aa44df77 Mon Sep 17 00:00:00 2001 From: "Graham Madarasz (Graham)" Date: Thu, 28 Feb 2013 15:35:14 -0800 Subject: Modify LLInstanceTracker to avoid using a map of strings to find a map of foo to find some pointers --- indra/newview/lltoast.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 9dfb29b905..49debe67f6 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -572,7 +572,7 @@ S32 LLToast::notifyParent(const LLSD& info) //static void LLToast::updateClass() { - for (LLInstanceTracker::instance_iter iter = LLInstanceTracker::beginInstances(); iter != LLInstanceTracker::endInstances(); ) + for (INSTANCE_TRACKER(LLToast)::instance_iter iter = INSTANCE_TRACKER(LLToast)::beginInstances(); iter != INSTANCE_TRACKER(LLToast)::endInstances(); ) { LLToast& toast = *iter++; -- cgit v1.2.3 From bf6182daa8b4d7cea79310547f71d7a3155e17b0 Mon Sep 17 00:00:00 2001 From: Graham Madarasz Date: Fri, 29 Mar 2013 07:50:08 -0700 Subject: Update Mac and Windows breakpad builds to latest --- indra/newview/lltoast.cpp | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 indra/newview/lltoast.cpp (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp old mode 100644 new mode 100755 -- cgit v1.2.3 From 87ba85eaabbfd5fd7ad8ca8136f4783b1d932264 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 24 Apr 2013 09:35:38 -0700 Subject: =?UTF-8?q?=C3=AF=C2=BB=C2=BFdiff=20-r=2059c7bed66dfd=20indra/llco?= =?UTF-8?q?mmon/lleventapi.h?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- indra/newview/lltoast.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 49debe67f6..a26e47e1c8 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -572,7 +572,8 @@ S32 LLToast::notifyParent(const LLSD& info) //static void LLToast::updateClass() { - for (INSTANCE_TRACKER(LLToast)::instance_iter iter = INSTANCE_TRACKER(LLToast)::beginInstances(); iter != INSTANCE_TRACKER(LLToast)::endInstances(); ) + for (LLInstanceTracker::instance_iter iter = LLInstanceTracker::beginInstances(); + iter != LLInstanceTracker::endInstances(); ) { LLToast& toast = *iter++; -- cgit v1.2.3 From cc3361352df3463e9ba16e57c04cc35e65821f33 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 24 Apr 2013 15:34:18 -0700 Subject: Follow-up code cleaning for LLToast work trying to get branch healthy. Reviewed by Kelly --- indra/newview/lltoast.cpp | 41 +++++++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index a26e47e1c8..4b60f49573 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -173,8 +173,20 @@ void LLToast::setHideButtonEnabled(bool enabled) //-------------------------------------------------------------------------- LLToast::~LLToast() -{ - mOnToastDestroyedSignal(this); +{ + if(LLApp::isQuitting()) + { + mOnFadeSignal.disconnect_all_slots(); + mOnDeleteToastSignal.disconnect_all_slots(); + mOnToastDestroyedSignal.disconnect_all_slots(); + mOnToastHoverSignal.disconnect_all_slots(); + mToastMouseEnterSignal.disconnect_all_slots(); + mToastMouseLeaveSignal.disconnect_all_slots(); + } + else + { + mOnToastDestroyedSignal(this); + } } //-------------------------------------------------------------------------- @@ -580,3 +592,28 @@ void LLToast::updateClass() toast.updateHoveredState(); } } + +// static +void LLToast::cleanupToasts() +{ + LL_CHECK_MEMORY; + + LLToast * toastp = NULL; + + while (LLInstanceTracker::instanceCount() > 0) + { + { // Need to scope iter to allow deletion + LLInstanceTracker::instance_iter iter = LLInstanceTracker::beginInstances(); + toastp = &(*iter); + } + + //llinfos << "Cleaning up toast id " << toastp->getNotificationID() << llendl; + + // LLToast destructor will remove it from the LLInstanceTracker. + if (!toastp) + break; // Don't get stuck in the loop if a null pointer somehow got on the list + + delete toastp; + } +} + -- cgit v1.2.3 From 7cb2f4f35856d4b51132d3915c05ac69dc3a90d5 Mon Sep 17 00:00:00 2001 From: simon Date: Wed, 24 Apr 2013 16:02:12 -0700 Subject: Remove an un-needed LL_CHECK_MEMORY check --- indra/newview/lltoast.cpp | 2 -- 1 file changed, 2 deletions(-) (limited to 'indra/newview/lltoast.cpp') diff --git a/indra/newview/lltoast.cpp b/indra/newview/lltoast.cpp index 4b60f49573..d876c9a3f4 100644 --- a/indra/newview/lltoast.cpp +++ b/indra/newview/lltoast.cpp @@ -596,8 +596,6 @@ void LLToast::updateClass() // static void LLToast::cleanupToasts() { - LL_CHECK_MEMORY; - LLToast * toastp = NULL; while (LLInstanceTracker::instanceCount() > 0) -- cgit v1.2.3