diff --git a/ChangeLog.txt b/ChangeLog.txt index 16b9afb37f..6d93a912dc 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -10,6 +10,13 @@ * Change, ! Fix, % Optimization, + Addition, - Removal, ; Comment */ +2014-01-02 18:41 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) + * src/vm/hvm.c + * clear STATIC variables before releasing thread specific data. + It should resolve potential problems with code using TSD to activate + cleanup procedure and later cannot correctly execute pointer item + destructors, i.e. OLE subsystem. + 2014-01-02 13:11 UTC+0100 Przemyslaw Czerpak (druzus/at/poczta.onet.pl) * src/rtl/itemseri.c ! fixed casting for C++ builds diff --git a/src/vm/hvm.c b/src/vm/hvm.c index 692157ffbf..84391f9bd1 100644 --- a/src/vm/hvm.c +++ b/src/vm/hvm.c @@ -1158,14 +1158,14 @@ int hb_vmQuit( void ) hb_vmDebuggerExit( HB_TRUE ); #endif - /* release thread specific data */ - hb_stackDestroyTSD(); - /* stop executing PCODE (HVM reenter request) */ s_fHVMActive = HB_FALSE; hb_vmStaticsClear(); + /* release thread specific data */ + hb_stackDestroyTSD(); + hb_errExit(); hb_clsReleaseAll();