* This is the collection of bindings for the tracked names being
* gained at the latest evaluation.
*/
- HashVector gained;
+ Vector gained;
/**
* This is the collection of bindings for the tracked names being
* last at the latest evaluation.
Tuple *t = Tuple_calloc( hv->fill );
VectorIndex index = 0;
for ( ; index < hv->table.size; index++ ) {
- t->elements[ index ] = &stringitem;
+ t->elements[ index ] = HashVector_next( hv, &index );
}
return t;
}
+static void View_reclaim(Query *this) {
+ View *v = (View*) this;
+ TupleSchema *ts = (TupleSchema*) gained->type;
+ Vector_resize( &v->gained, 0, Vector_clear_any, 0 );
+ Vector_resize( &v->lost, 0, Vector_clear_any, 0 );
+ free( ts->columns );
+ free( ts );
+ free( this );
+}
+
static QueryCallbacks View_def = {
- .reclaim = 0,
+ .reclaim = View_reclaim,
.next = 0,
.variables = 0
};
.fill = 0, .holes = 0, .type = (ItemKeyFun*) ts
}
};
+ Vector_resize( &hv, 0, Vector_clear_any, 0 );
return (Query*) vq;
}