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

0027604: Application Framework - memory is not released after closing XBF file

Virtual method *BinLDrivers_DocumentRetrievalDriver::Clear* now allows to Clear a cash data accumulated during a reading.
So, in successor class BinDrivers_DocumentRetrievalDriver this allows clearing the BinMNaming_NamedShapeDriver set of stored shapes when it is not needed anymore.
This commit is contained in:
mpv
2016-10-20 16:26:25 +03:00
committed by apn
parent c8c250a59d
commit bf95447514
5 changed files with 78 additions and 4 deletions

View File

@@ -90,6 +90,23 @@ void BinDrivers_DocumentRetrievalDriver::CheckShapeSection(
Standard_IStream& /*IS*/)
{}
//=======================================================================
//function : Clear
//purpose :
//=======================================================================
void BinDrivers_DocumentRetrievalDriver::Clear()
{
// Clear NamedShape driver
Handle(BinMDF_ADriver) aDriver;
if (myDrivers->GetDriver(STANDARD_TYPE(TNaming_NamedShape), aDriver))
{
Handle(BinMNaming_NamedShapeDriver) aNamedShapeDriver =
Handle(BinMNaming_NamedShapeDriver)::DownCast(aDriver);
aNamedShapeDriver->Clear();
}
BinLDrivers_DocumentRetrievalDriver::Clear();
}
//=======================================================================
//function : PropagateDocumentVersion
//purpose :

View File

@@ -47,6 +47,9 @@ public:
Standard_EXPORT virtual void ReadShapeSection (BinLDrivers_DocumentSection& theSection, Standard_IStream& theIS, const Standard_Boolean isMess = Standard_False) Standard_OVERRIDE;
Standard_EXPORT virtual void CheckShapeSection (const Storage_Position& thePos, Standard_IStream& theIS) Standard_OVERRIDE;
//! Clears the NamedShape driver
Standard_EXPORT virtual void Clear() Standard_OVERRIDE;
Standard_EXPORT virtual void PropagateDocumentVersion (const Standard_Integer theVersion) Standard_OVERRIDE;