//---------------------------------------------------------------------------------------- void BrowserDB::PointerToNULL(int Art) { if (Art == 1) // Löschen { if (cl_BrowserDB != NULL) { // Destroy the memory delete [] cl_BrowserDB; } if (ct_BrowserDB != NULL) { // Destroy the memory delete [] ct_BrowserDB; } if (db_BrowserDB != NULL) { db_BrowserDB->CommitTrans(); db_BrowserDB->Close(); wxDbCloseConnections(); delete db_BrowserDB; } } cl_BrowserDB = NULL; ct_BrowserDB = NULL; db_BrowserDB = NULL; p_LogWindow = NULL; }
EWXWEXPORT(void,ELJApp_initialize)(void* self,AppInitFunc _func,int _argc,void* _argv) { APPTerminating = 0; wxEntry(_argc, (char**)_argv); APPTerminating = 1; /* wxPendingEvents is deleted but not set to NULL -> disaster when restarted from an interpreter */ #if !defined(WXMAKINGDLL) && !defined(WXUSINGDLL) wxPendingEvents = NULL; #endif #if defined(wxUSE_ODBC) && (wxUSE_ODBC != 0) wxDbCloseConnections(); #endif }
EWXWEXPORT(void,ELJApp_initialize)(void* self,AppInitFunc _func,char* _cmd,void* _inst) { HINSTANCE wxhInstance = (HINSTANCE)_inst; APPTerminating = 0; wxEntry(wxhInstance, NULL, _cmd, SW_SHOWNORMAL); APPTerminating = 1; /* wxPendingEvents is deleted but not set to NULL -> disaster when restarted from an interpreter */ #if !defined(WXMAKINGDLL) && !defined(WXUSINGDLL) wxPendingEvents = NULL; #endif #if defined(wxUSE_ODBC) && (wxUSE_ODBC != 0) wxDbCloseConnections(); #endif }
EWXWEXPORT(void,ELJApp_InitializeC)(wxClosure* closure,int _argc,char** _argv) { wxHANDLE wxhInstance = GetModuleHandle(NULL); /* check memory leaks with visual C++ */ #if (defined(__WXDEBUG__) && defined(_MSC_VER)) _CrtMemState memStart,memEnd,memDif; _CrtMemCheckpoint( &memStart ); _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDOUT ); _CrtSetReportMode( _CRT_ERROR, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ERROR, _CRTDBG_FILE_STDOUT ); _CrtSetReportMode( _CRT_ASSERT, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_ASSERT, _CRTDBG_FILE_STDOUT ); #endif initClosure = closure; APPTerminating = 0; wxEntry(wxhInstance, NULL, (_argc > 0 ? _argv[0] : NULL), SW_SHOWNORMAL); APPTerminating = 1; /* wxPendingEvents is deleted but not set to NULL -> disaster when restarted from an interpreter */ #if !defined(WXMAKINGDLL) && !defined(WXUSINGDLL) wxPendingEvents = NULL; #endif #if defined(wxUSE_ODBC) && (wxUSE_ODBC != 0) wxDbCloseConnections(); #endif /* check memory leaks with visual C++ */ #if (defined(__WXDEBUG__) && defined(_MSC_VER)) _CrtMemCheckpoint( &memEnd ); if (_CrtMemDifference( &memDif, &memStart, &memEnd) && (memDif.lCounts[_NORMAL_BLOCK]>=-2 && memDif.lCounts[_NORMAL_BLOCK] <= 0)) { _RPT0(_CRT_WARN,"\n** memory leak detected (**\n" ); _CrtMemDumpStatistics(&memDif); /* _CrtMemDumpAllObjectsSince(&memStart); */ _RPT0(_CRT_WARN,"** memory leak report done **\n\n" ); } #endif }
EWXWEXPORT(void,ELJApp_InitializeC)(wxClosure* closure,int _argc,char** _argv) { char* args[] = { "wxc", NULL }; initClosure = closure; if (_argv == NULL) { /* note: wxGTK crashes when argv == NULL */ _argv = args; _argc = 1; } APPTerminating = 0; wxEntry(_argc,_argv); APPTerminating = 1; /* wxPendingEvents is deleted but not set to NULL -> disaster when restarted from an interpreter */ #if !defined(WXMAKINGDLL) && !defined(WXUSINGDLL) wxPendingEvents = NULL; #endif #if defined(wxUSE_ODBC) && (wxUSE_ODBC != 0) wxDbCloseConnections(); #endif }
EWXWEXPORT(void,wxDb_CloseConnections)() { #ifdef wxUSE_ODBC wxDbCloseConnections(); #endif }