Commit e472044
Fix undefined behavior in string_pool memory management
The string_pool_t destructor was using delete on memory allocated
with ::operator new, which is undefined behavior. Memory allocated
with ::operator new must be deallocated with ::operator delete.
Changes:
- Replace adobe::for_each(pool_m, adobe::delete_ptr()) with explicit
loop using ::operator delete
- Remove unused includes: adobe/algorithm/for_each.hpp and
adobe/functional.hpp
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>1 parent 903b653 commit e472044
1 file changed
Lines changed: 5 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
17 | 16 | | |
18 | | - | |
19 | 17 | | |
20 | 18 | | |
21 | 19 | | |
| |||
43 | 41 | | |
44 | 42 | | |
45 | 43 | | |
46 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
47 | 49 | | |
48 | 50 | | |
49 | 51 | | |
| |||
0 commit comments