For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings

 

Need to speed up your development?
Have a look at our:

Samples & Tools

 

Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

OCCTProxy class cleanup crashes

Garian Nobinger's picture
Forums: 

I've taken the OCCTProxy example (a C++ proxy class callable from CSharp) and converted it into a DLL interface that exposes a plain C interface for the viewer. The goal is to use OCCT's viewer from an older application that can only call C libraries, and that goal is working.

The OCCTProxy example does not have any destructor or cleanup. So I've attempted to implement one, based on allocations that happen in InitViewer(). But something is crashing. When I close my application's form (which calls the the destructor), the application crashes.

So my question is where to find good examples of how/when to cleanup all the instantiated in InitViewer(), and in what order to delete those classes safely.

Attached is the main source of my CProxy class and the extern'd C calls that wrap it.

Attachments: 
Garian Nobinger's picture

Replying to my own post with other possibly pertinent details: using Visual Studio 2013, and OCCT 6.7.1, all compiled in a 32-bit build environment.

Contact us

Attention: DO NOT use this form for all kind of request for the removal of your personal data. Please follow this link for such cases.