2008-06-03 19:59 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
* harbour/source/vm/garbage.c
% clear hb_stack return item in HB_GCALL() function before
executing hb_gcCollectAll()
This commit is contained in:
@@ -8,6 +8,11 @@
|
||||
2008-12-31 13:59 UTC+0100 Foo Bar <foo.bar@foobar.org>
|
||||
*/
|
||||
|
||||
2008-06-03 19:59 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/source/vm/garbage.c
|
||||
% clear hb_stack return item in HB_GCALL() function before
|
||||
executing hb_gcCollectAll()
|
||||
|
||||
2008-06-03 18:47 UTC+0200 Przemyslaw Czerpak (druzus/at/priv.onet.pl)
|
||||
* harbour/common.mak
|
||||
* harbour/source/rtl/Makefile
|
||||
|
||||
@@ -750,5 +750,15 @@ HB_FUNC( HB_GCSTEP )
|
||||
*/
|
||||
HB_FUNC( HB_GCALL )
|
||||
{
|
||||
/* call hb_ret() to clear stack return item, HVM does not clean
|
||||
* it before calling functions/procedures if caller does not
|
||||
* try to retrieve returned value. It's safe and cost nearly
|
||||
* nothing in whole GC scan process. It may help when previously
|
||||
* called function returned complex item with cross references.
|
||||
* It's quite common situation that people executes HB_GCALL()
|
||||
* immediately after such function. [druzus]
|
||||
*/
|
||||
hb_ret();
|
||||
|
||||
hb_gcCollectAll();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user