fixed self referencing
@@ -283,6 +283,11 @@ RING_API List * ring_list_newref_gc ( void *pState, List *pVariableList, List *p
pList->gc.pContainer = pVariableList ;
}
else {
+ /* If we don't have references here - it is a new reference! */
+ if ( ! ring_list_isref(pList) ) {
+ pList->gc.lNewRef = 1 ;
+ ring_list_updaterefcount_gc(pState,pList,RING_LISTREF_INC);
+ }
pVariableList = (List *) pList->gc.pContainer ;
}
return pVariableList ;
