make it more clear which methods free the buffer
This commit is contained in:
parent
b694da31f9
commit
02c486e1b3
3 changed files with 6 additions and 5 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue