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