From 81ef82840db65fd873b96ed428bbb2684a40ee2a Mon Sep 17 00:00:00 2001 From: Vadim Savchuk Date: Tue, 21 Sep 2010 17:41:53 +0300 Subject: STORM-166 FIXED Memory leak in LLSelectNode constructor. Submitting on behalf of Thickbrick Sleaford. One of the LLSelectNode constructors has a leak where it does "new LLPermisions()" twice, thus leaking the address of the first object created. This constructor is called every time you interact (click, hover, select, possibly other) with an object, once for each prim in the object. Since sizeof(LLPermissions) is 92 bytes, this can be a significant amount after a while. I think this might explain VWR-18528 (leaking LLpemissions instances), at least partially. This was fixed in snowglobe 1.x as part of SNOW-267. --- indra/newview/llselectmgr.cpp | 22 ++++++---------------- 1 file changed, 6 insertions(+), 16 deletions(-) (limited to 'indra/newview') diff --git a/indra/newview/llselectmgr.cpp b/indra/newview/llselectmgr.cpp index fb60b1ece7..9260abb2ac 100644 --- a/indra/newview/llselectmgr.cpp +++ b/indra/newview/llselectmgr.cpp @@ -5058,23 +5058,13 @@ LLSelectNode::LLSelectNode(LLViewerObject* object, BOOL glow) mSilhouetteExists(FALSE), mDuplicated(FALSE), mTESelectMask(0), - mLastTESelected(0) + mLastTESelected(0), + mName(LLStringUtil::null), + mDescription(LLStringUtil::null), + mTouchName(LLStringUtil::null), + mSitName(LLStringUtil::null), + mCreationDate(0) { - mObject = object; - selectAllTEs(FALSE); - mIndividualSelection = FALSE; - mTransient = FALSE; - mValid = FALSE; - mPermissions = new LLPermissions(); - mInventorySerial = 0; - mName = LLStringUtil::null; - mDescription = LLStringUtil::null; - mTouchName = LLStringUtil::null; - mSitName = LLStringUtil::null; - mSilhouetteExists = FALSE; - mDuplicated = FALSE; - mCreationDate = 0; - saveColors(); } -- cgit v1.2.3