[sldev] Destructor in llview.cpp does not give up floaters / VWR-810

Nicholaz Beresford nicholaz at blueflash.cc
Tue May 22 01:31:25 PDT 2007


The destructor in llview.cpp does not clean up the mFloaterControls 
member. Floater controls are added on the fly if necessary when some 
controls are attached to the view).

The bug and patch (fix) have been confirmed in the debugger and by 
looking at the leak dump.

https://jira.secondlife.com/browse/VWR-810

Patch attached
-------------- next part --------------
--- linden-orig/indra/llui/llview.cpp	2007-05-14 16:47:20.000000000 +0200
+++ linden/indra/llui/llview.cpp	2007-05-22 10:23:13.078125000 +0200
@@ -196,6 +196,21 @@
 		(*itor).second->clearDispatchers();
 		delete (*itor).second;
 	}
+
+
+	// PATCH [Nicholaz Beresford] 
+	//
+	// need to clean up mFloater Controls (dynamically added in llmenugl.cpp by
+	// LLMenuItemCheckGL::setCheckedControl, LLMenuItemCallGL::setVisibleControl,
+	// and LLMenuItemCallGL::setEnabledControl)
+	//
+	// VWR-810
+	control_map_t::iterator itor2;
+	for (itor2 = mFloaterControls.begin(); itor2 != mFloaterControls.end(); ++itor2)
+	{
+		delete (*itor2).second;
+	}
+	// ~PATCH
 }
 
 // virtual


More information about the SLDev mailing list