diff --git a/harbour/ChangeLog b/harbour/ChangeLog index fdc3a8d097..8987870d4f 100644 --- a/harbour/ChangeLog +++ b/harbour/ChangeLog @@ -8,6 +8,11 @@ 2008-12-31 13:59 UTC+0100 Foo Bar */ +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 diff --git a/harbour/source/vm/garbage.c b/harbour/source/vm/garbage.c index 34d7a016f8..a14dec0b7e 100644 --- a/harbour/source/vm/garbage.c +++ b/harbour/source/vm/garbage.c @@ -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(); }