diff options
Diffstat (limited to 'transform/allocs.go')
-rw-r--r-- | transform/allocs.go | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/transform/allocs.go b/transform/allocs.go index 35fa1b0bb..af7c70b28 100644 --- a/transform/allocs.go +++ b/transform/allocs.go @@ -36,8 +36,10 @@ func OptimizeAllocs(mod llvm.Module, printAllocs *regexp.Regexp, logger func(tok } targetData := llvm.NewTargetData(mod.DataLayout()) + defer targetData.Dispose() i8ptrType := llvm.PointerType(mod.Context().Int8Type(), 0) builder := mod.Context().NewBuilder() + defer builder.Dispose() for _, heapalloc := range getUses(allocator) { logAllocs := printAllocs != nil && printAllocs.MatchString(heapalloc.InstructionParent().Parent().Name()) |