1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-24 13:50:49 +03:00

0032044: Foundation Classes - NCollection_Array2::Resize() does not allocate pointer array

NCollection_Array2::Resize() has been fixed to set myDeletable before calling Allocate().
This commit is contained in:
kgv
2021-01-10 00:04:32 +03:00
committed by bugmaster
parent 4b52faa56f
commit 0f26ed5476
2 changed files with 16 additions and 5 deletions

View File

@@ -193,6 +193,8 @@ static void TestArray2 (QANCollection_Array2Func& theA2)
Handle(QANCollection_HArray2Func) aHa = new QANCollection_HArray2Func(aCArr);
// Assign
AssignCollection (aHa->ChangeArray2(), theA2);
delete[] rBlock;
}
// ===================== Test methods of List type ==========================
@@ -755,8 +757,17 @@ static Standard_Integer QANColTestArray2(Draw_Interpretor& di, Standard_Integer
}
}
QANCollection_Array2Func anArr2Copy2 = anArr2;
anArr2Copy2.Resize (LowerRow - 1, UpperRow - 1, LowerCol + 1, UpperCol + 1, false);
{
QANCollection_Array2Func anArr2Copy2 = anArr2;
anArr2Copy2.Resize (LowerRow - 1, UpperRow - 1, LowerCol + 1, UpperCol + 1, false);
}
{
// empty array resize
QANCollection_Array2Func anArr2Copy3;
anArr2Copy3.Resize (LowerRow, UpperRow, LowerCol, UpperCol, false);
anArr2Copy3 = anArr2;
}
return 0;
}