PK_SESSION_tidy   

PK_ERROR_code_t PK_SESSION_tidy
(
void
)


This function ensures that PK is in a valid state whenever a longjump is made.


Specific Errors:
    PK_ERROR_bad_thread             called from an internal Parasolid thread
    PK_ERROR_fatal_error            unable to restore PK to a valid state


This function must be called before further PK function calls whenever
an error handler or memory allocator longjumps back to application
code instead of returning control to Parasolid. This resets the state of the
PK to its initial settings, and tidies up internal memory.

PK_SESSION_tidy may be called before or after the longjump.

If PK_SESSION_tidy is called from an internal Parasolid thread, then it
will return the error code PK_ERROR_bad_thread, without raising a PK error
condition. Applications should return control to Parasolid from the error
handler or memory allocator in this case.

If PK_SESSION_tidy is unable to restore PK to a valid state then it
will return the error code PK_ERROR_fatal_error but it will not raise a PK
error condition.

PK_SESSION_tidy can be called at any time when a PK function is not active.