make it more clear which methods free the buffer

This commit is contained in:
Henry Hiles 2026-10-05 10:11:16 -04:00
commit 02c486e1b3
Signed by: Henry-Hiles
SSH key fingerprint: SHA256:VKQUdS31Q90KvX7EkKMHMBpUspcmItAh86a+v7PGiIs
3 changed files with 6 additions and 5 deletions

View file

@ -108,7 +108,7 @@ class ClientController extends AsyncNotifier<int> {
() => callback(handle, bufferPointer.ref),
);
final json = response.buf.toJson();
final json = response.buf.toJsonAndFree();
if (response.command.cast<Utf8>().toDartString() == "error") {
throw json;