Commit cf508c7b authored by Marek Vavruša's avatar Marek Vavruša

modules/tinyweb: cleanup on exit

parent f3b32a2f
......@@ -58,7 +58,7 @@ endef
define go_target
$(1) := $(2)/$(1)$(LIBEXT)
$(2)/$(1)$(LIBEXT): $$($(1)_SOURCES) $$($(1)_DEPEND)
@echo " GO $(2)"; CGO_CFLAGS="$(BUILD_CFLAGS)" CGO_LDFLAGS="$$($(1)_LIBS)" $(GO) build -buildmode=c-shared -o $$@ $$($(1)_SOURCES)
@echo " GO $(2)"; CGO_CFLAGS="$(BUILD_CFLAGS)" CGO_LDFLAGS="$$($(1)_LIBS) $(CFLAGS)" $(GO) build -buildmode=c-shared -o $$@ $$($(1)_SOURCES)
$(1)-clean:
$(RM) -r $(2)/$(1).h $(2)/$(1)$(LIBEXT)
ifeq ($$(strip $$($(1)_INSTALL)),)
......
......@@ -14,6 +14,7 @@ static inline const knot_layer_api_t *_layer(void)
import "C"
import (
"os"
"runtime"
"unsafe"
"fmt"
"net"
......@@ -187,6 +188,9 @@ func tinyweb_config(module *C.struct_kr_module, conf *C.char) int {
//export tinyweb_deinit
func tinyweb_deinit(module *C.struct_kr_module) int {
geo_db = nil
geo_db6 = nil
runtime.GC()
return 0
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment