From b664c91f461d5b09b9dfeea46ae4492ce1607ebc Mon Sep 17 00:00:00 2001 From: Antonio Linares Date: Mon, 8 Nov 1999 08:29:50 +0000 Subject: [PATCH] *** empty log message *** --- harbour/source/rtl/classes.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/harbour/source/rtl/classes.c b/harbour/source/rtl/classes.c index b4b0c886d1..c350464f3a 100644 --- a/harbour/source/rtl/classes.c +++ b/harbour/source/rtl/classes.c @@ -189,10 +189,14 @@ static void hb_clsRelease( PCLASS pClass ) { if( pMeth->pInitValue ) { - // if( pMeth->pFunction == hb___msgGetClsData ) /* is it a ClassData initializer ? */ - // hb_itemRelease( pMeth->pInitValue ); - // else - if( pMeth->uiData > pClass->uiDataFirst ) + if( pMeth->pFunction == hb___msgGetClsData ) /* is it a ClassData initializer ? */ + { + if( IS_ARRAY( pMeth->pInitValue ) ) + hb_itemClear( pMeth->pInitValue ); /* Don't release it as it may be shared by inherited classes */ + else + hb_itemRelease( pMeth->pInitValue ); + } + else if( pMeth->uiData > pClass->uiDataFirst ) hb_itemRelease( pMeth->pInitValue ); } }