diff --git a/v2/go.mod b/v2/go.mod index 18a3bbeaa..81aa02fd0 100644 --- a/v2/go.mod +++ b/v2/go.mod @@ -22,7 +22,7 @@ require ( github.com/leaanthony/debme v1.2.1 github.com/leaanthony/go-ansi-parser v1.0.1 github.com/leaanthony/go-common-file-dialog v1.0.3 - github.com/leaanthony/go-webview2 v0.0.0-20211130085920-c044f547e45c + github.com/leaanthony/go-webview2 v0.0.0-20211202091502-64deee9a37e3 github.com/leaanthony/gosod v1.0.3 github.com/leaanthony/idgen v1.0.0 github.com/leaanthony/slicer v1.5.0 diff --git a/v2/go.sum b/v2/go.sum index 45bcdf715..78e7fe57f 100644 --- a/v2/go.sum +++ b/v2/go.sum @@ -118,8 +118,8 @@ github.com/leaanthony/go-ansi-parser v1.0.1 h1:97v6c5kYppVsbScf4r/VZdXyQ21KQIfeQ github.com/leaanthony/go-ansi-parser v1.0.1/go.mod h1:7arTzgVI47srICYhvgUV4CGd063sGEeoSlych5yeSPM= github.com/leaanthony/go-common-file-dialog v1.0.3 h1:O0uGjKnWtdEADGrkg+TyAAbZylykMwwx/MNEXn9fp+Y= github.com/leaanthony/go-common-file-dialog v1.0.3/go.mod h1:TGhEc9eSJgRsupZ+iH1ZgAOnEo9zp05cRH2j08RPrF0= -github.com/leaanthony/go-webview2 v0.0.0-20211130085920-c044f547e45c h1:iqeWcnvUgu0/1dnnazsA8udhekLQoloJbGrq+3qlaY4= -github.com/leaanthony/go-webview2 v0.0.0-20211130085920-c044f547e45c/go.mod h1:iX54IaVk1FnDqMuHJ47VYLPQOcVqQiOe9SJACt9CAbU= +github.com/leaanthony/go-webview2 v0.0.0-20211202091502-64deee9a37e3 h1:vKdQzUWiq5wtVBLTTeYuikcgQbF/HtYaOmxGzbfkcT0= +github.com/leaanthony/go-webview2 v0.0.0-20211202091502-64deee9a37e3/go.mod h1:iX54IaVk1FnDqMuHJ47VYLPQOcVqQiOe9SJACt9CAbU= github.com/leaanthony/gosod v1.0.3 h1:Fnt+/B6NjQOVuCWOKYRREZnjGyvg+mEhd1nkkA04aTQ= github.com/leaanthony/gosod v1.0.3/go.mod h1:BJ2J+oHsQIyIQpnLPjnqFGTMnOZXDbvWtRCSG7jGxs4= github.com/leaanthony/idgen v1.0.0 h1:IZreR+JGEzFV4yeVuBZA25gM0keUoFy+RDUldncQ+Jw= diff --git a/v2/internal/frontend/desktop/darwin/Application.m b/v2/internal/frontend/desktop/darwin/Application.m index de8a059d9..8c5d93d15 100644 --- a/v2/internal/frontend/desktop/darwin/Application.m +++ b/v2/internal/frontend/desktop/darwin/Application.m @@ -58,6 +58,8 @@ void ProcessURLResponse(void *inctx, const char *url, const char *contentType, v NSData *nsdata = [NSData dataWithBytes:data length:datalength]; [ctx processURLResponse:nsurl :nsContentType :nsdata]; + + [nsdata release]; } void ExecJS(void* inctx, const char *script) { diff --git a/v2/internal/frontend/desktop/windows/frontend.go b/v2/internal/frontend/desktop/windows/frontend.go index fd348394f..025f1e4d3 100644 --- a/v2/internal/frontend/desktop/windows/frontend.go +++ b/v2/internal/frontend/desktop/windows/frontend.go @@ -356,6 +356,8 @@ func (f *Frontend) processRequest(req *edge.ICoreWebView2WebResourceRequest, arg if err != nil { return } + defer response.Release() + // Send response back err = args.PutResponse(response) if err != nil {