Summary
char-name leaks memory
Metadata
- Id: ee33f9cbcb71e8bd14fc70942e45a830c470e86b
- Trac id:
- Type: defect
- Reporter: felix
- Owner:
- Cc:
- Status: new
- Component: core libraries
- Estimated difficulty: easy
- Resolution:
- Priority: minor
- Milestone:
- Version: 6.0.0
- Changetime: 2026-07-05 18:48:35 UTC
- Created: 2026-07-05 18:45:19 UTC
- Keywords:
Description
The current implementation of `char-name' leaks memory when entries are removed (by passing #f as second argument). We maintain two tables/alists for mapping chars to names and vice versa and removing an entry currently just clears a-list heads in either of the tables.
One way to implement this would be to just use a single plain a-list and use tight lookup loops for retrieving the corresponding mapping, whould should be fast enough as long as the number of mappings is small. For larger sets of mappings this will not scale well, though.