feat: finish basic function of BMapSharp.

- fix weird C sharp behavior about calling FreeNativeData without calling ManagedToNative, which cause segment fault.
- disable unhandled exception handler in debug mode for BMap.
- change all associated code involving these issues.
This commit is contained in:
2024-10-05 11:58:25 +08:00
parent 3566efa36a
commit b319e0fcb6
7 changed files with 135 additions and 43 deletions

View File

@ -55,7 +55,7 @@ bool BMInit() {
if (CheckInited()) return false;
// register exception handler if we are in Windows.
#if YYCC_OS == YYCC_OS_WINDOWS
#if defined(LIBCMO_BUILD_RELEASE) && (YYCC_OS == YYCC_OS_WINDOWS)
YYCC::ExceptionHelper::Register();
#endif
@ -89,7 +89,7 @@ bool BMDispose() {
LibCmo::CK2::CKShutdown();
// unregister exception handler if we are in Windows
#if YYCC_OS == YYCC_OS_WINDOWS
#if defined(LIBCMO_BUILD_RELEASE) && (YYCC_OS == YYCC_OS_WINDOWS)
YYCC::ExceptionHelper::Unregister();
#endif