On Tue, 3 Feb 2009, Ron Pinkas wrote: > Yes, you can move it, it appears to be a valid correction, if user code calls > aEval() with invalid arguments (my mistake).
Thank you. I'll move. But, what about the second part? Looks like the following code could leave unreleased memory: x := {} AEVAL( x, { || NIL } ) AADD( x, DATE() ) // Dynamically created string... AADD( x, TIME() ) // Dynamically created string... AEVAL( x, { |x,i| IF( i == 2, ASIZE( x, i - 1 ), ) } ) // Removes last item, but it't not cleared! // (Ok... it's wrong code, but...) x := NIL // Only first item will be released... Will it happen? >> In other hand, same in the file source/vm/arrays.c , function >> hb_arraySize() , about line 175, the code is: >> if( pBaseArray->ulLen > ulLen ) >> { >> // Clipper defers all aSize() shrinking operations when in >> aEval()! >> if( ( pBaseArray->uiFlags & 0xF000 ) != 0 ) >> { >> pBaseArray->ulLen = ulLen; >> return TRUE; Here... deleted items aren't released... >> } >> pItems = pBaseArray->pItems + ulLen; >> ulPos = pBaseArray->ulLen - ulLen; >> do >> { >> hb_itemSetNil( pItems ); //don't use ++ here >> pItems++; >> } while( --ulPos ); >> } >> ... >> ... >> >> When "( pBaseArray->uiFlags & 0xF000 )" is on, items deleted with >> "ASIZE( aArray, LEN( aArray ) - 1 )" aren't cleared. Is it possible >> any "complex" item would not be freed? Atte. Vic ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ xHarbour-developers mailing list xHarbour-developers@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xharbour-developers