mirror of
https://github.com/pgvector/pgvector.git
synced 2026-07-01 10:11:20 +08:00
Free tuple
This commit is contained in:
@@ -185,6 +185,9 @@ hnswgettuple(IndexScanDesc scan, ScanDirection dir)
|
||||
Datum value = PointerGetDatum(hc->element->vec);
|
||||
bool isnull = false;
|
||||
|
||||
if (scan->xs_itup)
|
||||
pfree(scan->xs_itup);
|
||||
|
||||
scan->xs_itup = index_form_tuple(scan->xs_itupdesc, &value, &isnull);
|
||||
scan->xs_itup->t_tid = *tid;
|
||||
}
|
||||
@@ -229,6 +232,9 @@ hnswendscan(IndexScanDesc scan)
|
||||
if (BufferIsValid(so->buf))
|
||||
ReleaseBuffer(so->buf);
|
||||
|
||||
if (scan->xs_itup)
|
||||
pfree(scan->xs_itup);
|
||||
|
||||
MemoryContextDelete(so->tmpCtx);
|
||||
|
||||
pfree(so);
|
||||
|
||||
Reference in New Issue
Block a user