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 a descendant class - Output of meaningful error messages is restored in DRAW commands fsdread and fsdwrite
This commit is contained in:
@@ -50,11 +50,11 @@ TCollection_ExtendedString UTL::Extension(const TCollection_ExtendedString& aFil
|
||||
return TCollection_ExtendedString(theExtension);
|
||||
}
|
||||
|
||||
Storage_Error UTL::OpenFile(Storage_BaseDriver& aDriver,
|
||||
Storage_Error UTL::OpenFile(const Handle(Storage_BaseDriver)& aDriver,
|
||||
const TCollection_ExtendedString& aFileName,
|
||||
const Storage_OpenMode aMode)
|
||||
{
|
||||
return aDriver.Open(TCollection_AsciiString(aFileName),aMode);
|
||||
return aDriver->Open(TCollection_AsciiString(aFileName),aMode);
|
||||
}
|
||||
|
||||
void UTL::AddToUserInfo(const Handle(Storage_Data)& aData,
|
||||
|
@@ -46,7 +46,9 @@ public:
|
||||
|
||||
Standard_EXPORT static TCollection_ExtendedString xgetenv (const Standard_CString aCString);
|
||||
|
||||
Standard_EXPORT static Storage_Error OpenFile (Storage_BaseDriver& aFile, const TCollection_ExtendedString& aName, const Storage_OpenMode aMode);
|
||||
Standard_EXPORT static Storage_Error OpenFile (const Handle(Storage_BaseDriver)& aFile,
|
||||
const TCollection_ExtendedString& aName,
|
||||
const Storage_OpenMode aMode);
|
||||
|
||||
Standard_EXPORT static void AddToUserInfo (const Handle(Storage_Data)& aData, const TCollection_ExtendedString& anInfo);
|
||||
|
||||
|
Reference in New Issue
Block a user