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:
Przemyslaw Czerpak
2008-06-03 17:59:45 +00:00
parent 871e6c9ae1
commit 1bd32ce932
2 changed files with 15 additions and 0 deletions

View File

@@ -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

View File

@@ -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();
}