| ... | @@ -744,7 +744,7 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { | ... | @@ -744,7 +744,7 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { |
| 744 | .object_format = options.object_format orelse options.target.getObjectFormat(), | 744 | .object_format = options.object_format orelse options.target.getObjectFormat(), |
| 745 | .cbe = options.cbe, | 745 | .cbe = options.cbe, |
| 746 | }); | 746 | }); |
| 747 | errdefer bin_file.*.deinit(); | 747 | errdefer bin_file.destroy(); |
| 748 | | 748 | |
| 749 | const root_scope = blk: { | 749 | const root_scope = blk: { |
| 750 | if (mem.endsWith(u8, options.root_pkg.root_src_path, ".zig")) { | 750 | if (mem.endsWith(u8, options.root_pkg.root_src_path, ".zig")) { |
| ... | @@ -793,9 +793,8 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { | ... | @@ -793,9 +793,8 @@ pub fn init(gpa: *Allocator, options: InitOptions) !Module { |
| 793 | } | 793 | } |
| 794 | | 794 | |
| 795 | pub fn deinit(self: *Module) void { | 795 | pub fn deinit(self: *Module) void { |
| 796 | self.bin_file.deinit(); | 796 | self.bin_file.destroy(); |
| 797 | const allocator = self.allocator; | 797 | const allocator = self.allocator; |
| 798 | allocator.destroy(self.bin_file); | | |
| 799 | self.deletion_set.deinit(allocator); | 798 | self.deletion_set.deinit(allocator); |
| 800 | self.work_queue.deinit(); | 799 | self.work_queue.deinit(); |
| 801 | | 800 | |