Commit 2951645
committed
test(transformer/styled-components): fix memory leak (#12207)
Fix memory leak in tests for `styled-components` transform.
```rs
let allocator = Box::leak(Box::new(Allocator::default()));
let ast = AstBuilder::new(allocator);
```
Miri didn't run on the PR that introduced this code, but it caught the leak in an unrelated PR touching `oxc_allocator` which ran Miri in CI: https://github.com/oxc-project/oxc/actions/runs/16203915572/job/45749445785?pr=12203#step:5:822
I'm unclear why `Box::leak` was used here.1 parent 7b1f4a5 commit 2951645
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | | - | |
1260 | | - | |
| 1259 | + | |
| 1260 | + | |
1261 | 1261 | | |
1262 | 1262 | | |
1263 | 1263 | | |
| |||
0 commit comments