diff options
| author | Jean Boussier <jean.boussier@gmail.com> | 2026-01-31 18:41:55 +0100 |
|---|---|---|
| committer | Jean Boussier <jean.boussier@gmail.com> | 2026-02-01 12:17:29 +0100 |
| commit | d328412da84cdd26adb9a162bbf745bd43f7ee75 (patch) | |
| tree | c84a9b80291db3b8430ec6e0c6872df7683c17c3 /hash.c | |
| parent | dc6cdb1759166630f29c456279c84fee1c0351d5 (diff) | |
Use ruby_sized_xfree to free embedded Hash and Set
Diffstat (limited to 'hash.c')
| -rw-r--r-- | hash.c | 6 |
1 files changed, 1 insertions, 5 deletions
@@ -1173,17 +1173,13 @@ hash_st_free(VALUE hash) { HASH_ASSERT(RHASH_ST_TABLE_P(hash)); - st_table *tab = RHASH_ST_TABLE(hash); - - xfree(tab->bins); - xfree(tab->entries); + rb_st_free_embedded_table(RHASH_ST_TABLE(hash)); } static void hash_st_free_and_clear_table(VALUE hash) { hash_st_free(hash); - RHASH_ST_CLEAR(hash); } |
