diff --git a/harbour/source/vm/arrays.c b/harbour/source/vm/arrays.c index fc7ebac2e7..05aa1ff923 100644 --- a/harbour/source/vm/arrays.c +++ b/harbour/source/vm/arrays.c @@ -914,8 +914,8 @@ HB_GARBAGE_FUNC( hb_arrayReleaseGarbage ) * Arrays, objects and codeblock should be released directly by * the garbage collector */ - if( HB_IS_STRING( pItem ) && pItem->item.asString.value && pItem->item.asString.bPcode ) - hb_xfree( pItem->item.asString.value ); + if( HB_IS_STRING( pItem ) ) + hb_itemClear( pItem ); ++pItem; } @@ -923,4 +923,4 @@ HB_GARBAGE_FUNC( hb_arrayReleaseGarbage ) pBaseArray->pItems = NULL; pBaseArray->ulLen = 0; } -} +} \ No newline at end of file