The reference to the old array on the stack is removed by f_add(). So the extra reference you should be worried about is the one in _datarows. Because as long as the variable in the object holds a reference to the old array, it can not be destructively modified. I expect setting _datarows to 0 after the index_no_free2() but before the f_add() should do the trick, but maybe there is a more elegant solution?