mirror of
https://github.com/go-gst/go-gst.git
synced 2025-09-26 20:11:18 +08:00
remove asan calls and GC
This commit is contained in:
@@ -6,7 +6,6 @@ import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"path/filepath"
|
||||
"runtime"
|
||||
"runtime/pprof"
|
||||
|
||||
"github.com/go-gst/go-glib/glib"
|
||||
@@ -16,12 +15,6 @@ import (
|
||||
"github.com/go-gst/go-gst/gst"
|
||||
)
|
||||
|
||||
// #include <stdio.h>
|
||||
// #include <stdlib.h>
|
||||
//
|
||||
// void __lsan_do_leak_check(void);
|
||||
import "C"
|
||||
|
||||
func run(ctx context.Context) error {
|
||||
ctx, cancel := signal.NotifyContext(ctx, os.Interrupt)
|
||||
defer cancel()
|
||||
@@ -109,21 +102,8 @@ func main() {
|
||||
fmt.Fprintln(os.Stderr, err)
|
||||
}
|
||||
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
runtime.GC()
|
||||
|
||||
C.__lsan_do_leak_check()
|
||||
// this is very helpful to find memory leaks, see github.com/go-gst/asanutils
|
||||
// asanutils.CheckLeaks()
|
||||
|
||||
prof := pprof.Lookup("go-glib-reffed-objects")
|
||||
|
||||
|
Reference in New Issue
Block a user