Hi,
Die mögliche Ursache hierfür könnten Threads sein. Xbase++ ist multithreaded und großartig. Der Thread könnte durch die WinAPI-Funktionen ExitThread oder TerminateThread beendet werden. Ich weiß nicht, was Xbase++ verwendet. Wenn es ExitThread verwendet, ist es in Ordnung, aber wenn es TerminateThread verwendet, gibt es viele Probleme. Folgendes sagt die MS-Thread-Referenz:
ExitThread is the preferred method of exiting a thread. When this function is called, the current thread's stack is deallocated, all pending I/O initiated by the thread is canceled, and the thread terminates. The entry-point function of all attached DLLs is invoked with a value indicating that the thread is detaching from the DLL.
A thread in an executable that is linked to the static C run-time library (CRT) should use _beginthread and _endthread for thread management rather than CreateThread and ExitThread. Failure to do so results in small memory leaks when the thread calls ExitThread.
The TerminateThread and TerminateProcess functions should be used only in extreme circumstances, since they do not allow threads to clean up, do not notify attached DLLs, and do not free the initial stack, causing a memory leak.
Terminating a thread does not necessarily remove the thread object from the system. A thread object is deleted when the last thread handle is closed.
Wie Sie sehen, ist dies eine sehr heikle und wichtige Angelegenheit, und wenn jemand Details darüber hat, wie es in Xbase++ implementiert wird, wäre es schön, es mitzuteilen.
Slavko