Closed Bug 109490 Opened 23 years ago Closed 23 years ago

MLK: Memory leak of 164 bytes from 1 block allocated in nsGrid::BuildRows(nsIBox *,int,nsGridRow * *,int)

Categories

(Core :: XUL, defect)

x86
Windows 2000
defect
Not set
major

Tracking

()

VERIFIED FIXED
mozilla0.9.7

People

(Reporter: stephend, Assigned: eric)

Details

(Keywords: memory-leak, Whiteboard: need r and sr)

Attachments

(1 file)

I see this everytime I use mail on Windows 2000, IMAP.  Latest tip.

    [W] MLK: Memory leak of 164 bytes from 1 block allocated in 
nsGrid::BuildRows(nsIBox *,int,nsGridRow * *,int)
        Distribution of leaked blocks
        Allocation location
        new(UINT)      [msvcrt.DLL]
        nsGrid::BuildRows(nsIBox *,int,nsGridRow * *,int) [nsGrid.cpp:367]
          {
            if (aRowCount > mRowCount) {
               delete[] mRows;
     =>        row = new nsGridRow[aRowCount];
            } else {
              for (PRInt32 i=0; i < mRowCount; i++)
                mRows[i].Init(nsnull, PR_FALSE);
        nsGrid::RebuildIfNeeded(void) [nsGrid.cpp:234]
          }
        
          // build and poplulate row and columns arrays
     =>   BuildRows(mRowBox, rowCount, &mRows, PR_TRUE);
          BuildRows(mColumnBox, columnCount, &mColumns, PR_FALSE);
        
          // build and populate the cell map
        nsGrid::GetMinRowHeight(nsBoxLayoutState&,int,int&,int) [nsGrid.cpp:994]
        nsresult
        nsGrid::GetMinRowHeight(nsBoxLayoutState& aState, PRInt32 aIndex, 
nscoord& aSize, PRBool aIsHorizontal)
        {
     =>   RebuildIfNeeded();
        
          nsGridRow* row = GetRowAt(aIndex, aIsHorizontal);
        
        nsGrid::GetMinRowSize(nsBoxLayoutState&,int,nsSize&,int) 
[nsGrid.cpp:596]
          //  return NS_OK;
        
          nscoord height = 0;
     =>   GetMinRowHeight(aState, aRowIndex, height, aIsHorizontal);
          SetLargestSize(aSize, height, aIsHorizontal);
        
          return NS_OK;
        nsGridRowLeafLayout::GetMinSize(nsIBox *,nsBoxLayoutState&,nsSize&) 
[nsGridRowLeafLayout.cpp:110]
          if (!grid)
            return nsGridRowLayout::GetMinSize(aBox, aState, aSize);
          else {
     =>     nsresult rv = grid->GetMinRowSize(aState, index, aSize, 
isHorizontal);
            AddBorderAndPadding(aBox, aSize);
            AddInset(aBox, aSize);
            return rv;
        nsContainerBox::GetMinSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:539]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>         rv = mLayoutManager->GetMinSize(this, aState, aSize);
                nsIBox::AddCSSMinSize(aState, this, aSize);
            } else {
                rv = nsBox::GetMinSize(aState, aSize);
        nsBoxFrame::GetMinSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:1037]
          nsresult rv = NS_OK;
        
          mMinSize.SizeTo(0,0);
     =>   rv = nsContainerBox::GetMinSize(aBoxLayoutState, mMinSize);
        
          aSize = mMinSize;
        
        nsGridRowGroupLayout::GetMinSize(nsIBox *,nsBoxLayoutState&,nsSize&) 
[nsGridRowGroupLayout.cpp:169]
        NS_IMETHODIMP
        nsGridRowGroupLayout::GetMinSize(nsIBox* aBox, nsBoxLayoutState& 
aState, nsSize& aSize)
        {
     =>  nsresult rv = nsGridRowLayout::GetMinSize(aBox, aState, aSize);
        
          nsGrid* grid = nsnull;
          PRInt32 index = 0;
        nsContainerBox::GetMinSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:539]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>         rv = mLayoutManager->GetMinSize(this, aState, aSize);
                nsIBox::AddCSSMinSize(aState, this, aSize);
            } else {
                rv = nsBox::GetMinSize(aState, aSize);
        nsBoxFrame::GetMinSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:1037]
          nsresult rv = NS_OK;
        
          mMinSize.SizeTo(0,0);
     =>   rv = nsContainerBox::GetMinSize(aBoxLayoutState, mMinSize);
        
          aSize = mMinSize;
        
        nsGridLayout2::GetMinSize(nsIBox *,nsBoxLayoutState&,nsSize&) 
[nsGridLayout2.cpp:107]
        NS_IMETHODIMP
        nsGridLayout2::GetMinSize(nsIBox* aBox, nsBoxLayoutState& aState, 
nsSize& aSize)
        {
     =>   nsresult rv = nsStackLayout::GetMinSize(aBox, aState, aSize);
          if (NS_FAILED(rv))
            return rv;
        
        nsContainerBox::GetMinSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:539]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>         rv = mLayoutManager->GetMinSize(this, aState, aSize);
                nsIBox::AddCSSMinSize(aState, this, aSize);
            } else {
                rv = nsBox::GetMinSize(aState, aSize);
        nsBoxFrame::GetMinSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:1037]
          nsresult rv = NS_OK;
        
          mMinSize.SizeTo(0,0);
     =>   rv = nsContainerBox::GetMinSize(aBoxLayoutState, mMinSize);
        
          aSize = mMinSize;
        
        nsContainerBox::GetMinSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:539]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>         rv = mLayoutManager->GetMinSize(this, aState, aSize);
                nsIBox::AddCSSMinSize(aState, this, aSize);
            } else {
                rv = nsBox::GetMinSize(aState, aSize);
        nsBoxFrame::GetMinSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:1037]
          nsresult rv = NS_OK;
        
          mMinSize.SizeTo(0,0);
     =>   rv = nsContainerBox::GetMinSize(aBoxLayoutState, mMinSize);
        
          aSize = mMinSize;
        
        nsBoxFrame::GetPrefSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:999]
          PropagateDebug(aBoxLayoutState);
        
          nsresult rv = NS_OK;
     =>   rv = nsContainerBox::GetPrefSize(aBoxLayoutState, mPrefSize);
        
          aSize = mPrefSize;
        
    nsContainerBox::GetPrefSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:503]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>       rv = mLayoutManager->GetPrefSize(this, aState, aSize);
              nsIBox::AddCSSPrefSize(aState, this, aSize);
            } else
              rv = nsBox::GetPrefSize(aState, aSize);
    nsBoxFrame::GetPrefSize(nsBoxLayoutState&,nsSize&) [nsBoxFrame.cpp:999]
          PropagateDebug(aBoxLayoutState);
        
          nsresult rv = NS_OK;
     =>   rv = nsContainerBox::GetPrefSize(aBoxLayoutState, mPrefSize);
        
          aSize = mPrefSize;
        
    nsContainerBox::GetPrefSize(nsBoxLayoutState&,nsSize&) 
[nsContainerBox.cpp:503]
            aSize.height = 0;
        
            if (mLayoutManager) {
     =>       rv = mLayoutManager->GetPrefSize(this, aState, aSize);
              nsIBox::AddCSSPrefSize(aState, this, aSize);
            } else
              rv = nsBox::GetPrefSize(aState, aSize);
targeting
Status: NEW → ASSIGNED
Target Milestone: --- → mozilla0.9.7
Attached patch Fix for leakSplinter Review
need r and sr
Whiteboard: need r and sr
Comment on attachment 58455 [details] [diff] [review]
Fix for leak

looks ok. r=naving
Attachment #58455 - Flags: review+
Comment on attachment 58455 [details] [diff] [review]
Fix for leak

sr=hewitt
Attachment #58455 - Flags: superreview+
1.9 evaughan%netscape.com Dec 3 15:41 Facelift for nsBoxToBlockAdaptor -r hyatt
-sr waterson #110328
Grid memory leak -r naving -sr hewitt #109490

This had already been checked in.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
verified fixed with the latest win32 tip
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: