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;
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class GomuksListenerController extends AsyncNotifier<void> {
|
|||
try {
|
||||
final muksEventType = command.cast<Utf8>().toDartString();
|
||||
debugPrint("Handling $muksEventType...");
|
||||
final decodedMuksEvent = data.toJson();
|
||||
final decodedMuksEvent = data.toJsonAndFree();
|
||||
|
||||
switch (muksEventType) {
|
||||
case "client_state":
|
||||
|
|
|
|||
Loading…
Reference in a new issue