c++ iobjects
问题:
UGWorkspaceConnection* pworkSpaceCnn = new UGWorkspaceConnection();
...
UGWorkspace* pWorkSpace = new UGWorkspace();
UGbool bSucc = pWorkSpace->Open(*pworkSpaceCnn);
1、需要delete pWorkSpace 吗?pWorkSpace 应该如何释放?那么pworkSpaceCnn 呢?如何释放?
2、 pWorkSpace->Open失败的可能原因有哪些?
open失败时,我这里提示如下
Unhandled exception at at 0x764CC54F in mytool.exe: Microsoft C++ exception: std::bad_alloc at memory location 0x5599DE54.
非常感谢!