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

0031546: Application Framework - Memory leak (100 bytes) on Load / Close OCAF document

Class Standard_BaseDriver is inherited from Standard_Transient, its descendants are updated accordingly.
Handle is used to manipulate objects of this class and its descendants (instead of references or raw pointers) to ensure automatic destruction.

Added test bugs caf bug31546

Related:
- Standard_OVERRIDE is added in declarations of virtual methods in descendants of Storage_BaseDriver
- Methods operator << and operator >> are removed in descendants of Storage_BaseDriver (they repeat the same methods inherited from the base class)
- Typedef PCDM_BaseDriverPointer is marked as deprecated
- Unused class DDI_Ostream is removed
- Private field Standard_Transient::count is renamed to myRefCount_ to avoid compiler warnings if the same name is used within the scope of any descendant class
- Reporting specific error messages is restored in DRAW commands fsdread and fsdwrite
This commit is contained in:
abv
2020-05-04 22:25:03 +03:00
parent f7382bd526
commit ffe942a526
54 changed files with 664 additions and 2475 deletions

View File

@@ -37,7 +37,8 @@
//purpose :
//=======================================================================
PCDM_TypeOfFileDriver PCDM::FileDriverType(const TCollection_AsciiString& aFileName, PCDM_BaseDriverPointer& aBaseDriver) {
PCDM_TypeOfFileDriver PCDM::FileDriverType(const TCollection_AsciiString& aFileName, Handle(Storage_BaseDriver)& aBaseDriver)
{
if(FSD_CmpFile::IsGoodFileType(aFileName) == Storage_VSOk) {
aBaseDriver=new FSD_CmpFile;
return PCDM_TOFD_CmpFile;
@@ -61,7 +62,7 @@ PCDM_TypeOfFileDriver PCDM::FileDriverType(const TCollection_AsciiString& aFileN
//purpose :
//=======================================================================
PCDM_TypeOfFileDriver PCDM::FileDriverType (Standard_IStream& theIStream, PCDM_BaseDriverPointer& theBaseDriver)
PCDM_TypeOfFileDriver PCDM::FileDriverType (Standard_IStream& theIStream, Handle(Storage_BaseDriver)& theBaseDriver)
{
TCollection_AsciiString aReadMagicNumber;