PDA

View Full Version : MS LeakDiag report a memory leak with CGXGridCore::SetCoveredCellsRowCol()



Arvinman
10-11-2011, 02:37 AM
Hi all,

Currently I'm verifying our program's memory leak with LeakDiag from Microsoft.

And I found this leak stack that related to Stingray 10.4



CGXGridCoveredCellsImp__StoreCoveredCellsRowCol, c:\program files\rogue wave\stingray studio 10.4\src\grid\gxcvrcel.cpp, 318
CGXGridCore__StoreCoveredCellsRowCol: c:\program files\rogue wave\stingray studio 10.4\src\grid\gxcorabs.cpp, 661
CGXGridCoveredCellsImp__SetCoveredCellsRowCol: c:\program files\rogue wave\stingray studio 10.4\src\grid\gxcvrcel.cpp, 167
CGXGridCore__SetCoveredCellsRowCol: c:\program files\rogue wave\stingray studio 10.4\src\grid\gxcorabs.cpp, 639



Our class are inherited from CGXGridCore, like CMatrixView : public CGXGridCore.


Some extract from our source code


CMatrixView* CMatrixFrame::GetView()
{
CMatrixView* pView = (CMatrixView*)GetActiveView();
if(!pView)
{
pView = (CMatrixView*)(m_wndSplitter.GetPane(0, 0));
}

assert(pView);
return pView;
}

void CMatrixFrame::setGroupRanges(const MTXCellRange &range)
{
AFX_MANAGE_STATE(AfxGetStaticModuleState());

CGXGridParam* pParams = ((CMatrixDoc*)GetActiveDocument())->m_pParam;
pParams->GetCoveredCellsList()->RemoveAll();

pParams->UpdateCoveredCellsList();

ROWCOL nToCol = GetColCount();
MTX_ModelInterface * pModel = GetView()->GetDocument()->getModel();
if ( pModel && pModel->isInsertorColumn(nToCol) )
{
nToCol--;
}

POSITION index = range.getRangeList()->GetHeadPosition();
CGXRange* pRange = 0;
while ( index )
{
pRange = range.getRangeList()->GetNext(index);
GetView()->SetCoveredCellsRowCol( pRange->top, pRange->left, pRange->bottom, nToCol); // leak here
}
}


Is this a known issue or not?
I do not have access to Stringray productkey within my company yet. So I couldn't check if there is any hotfix for this.

147

boris
10-21-2011, 01:37 PM
Hi Arvinman,
This is unknown issue, we need to investigate it.
If you have current support license, please, submit support request at http://www.roguewave.com/login.aspx?returnurl=%2fsupport%2fcontact-support%2ffile-a-support-request.aspx

Regards,
Boris