diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-10-27 14:52:00 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-10-27 14:52:00 -0700 |
| commit | e494ce760428cde79b63e9a9016c4af06484eef3 (patch) | |
| tree | 3205a2de5e327e61883c1d2dec37e027fe079842 /src/type.zig | |
| parent | c1a5ff34f3f68a2a0bc32828ab483328cd436fea (diff) | |
| download | zig-e494ce760428cde79b63e9a9016c4af06484eef3.tar.gz zig-e494ce760428cde79b63e9a9016c4af06484eef3.zip | |
stage2: fix small memory leak of test_functions when using `zig test`
The way `zig test` works is that it uses a stand-in
var test_functions: []const TestFn = undefined;
during semantic analysis, but then just before codegen, it swaps out the
value with a constant like this:
const test_functions: []const TestFn = .{foo, bar, baz, etc};
Before this commit, the `Module.Variable` associated with the stand-in
value was leaked; now it is properly cleaned up before being replaced.
Diffstat (limited to 'src/type.zig')
0 files changed, 0 insertions, 0 deletions
