diff options
| author | KOBAYASHI Shuji <[email protected]> | 2020-11-15 16:45:03 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2020-11-15 16:45:03 +0900 |
| commit | acc114003b4cde1d51ae60de383e58c15566f400 (patch) | |
| tree | 505ea48c61042135841fd6ee7602f42136556a56 /src/codedump.c | |
| parent | a6119b00778cee2e5621246ee7c63ff48e610e15 (diff) | |
| download | mruby-acc114003b4cde1d51ae60de383e58c15566f400.tar.gz mruby-acc114003b4cde1d51ae60de383e58c15566f400.zip | |
Fix that large integer is not GCed with Word-boxing
### Example (32-bit Word-boxing)
```ruby
# example.rb
int_count = ObjectSpace.count_objects[:T_INTEGER]||0
int = 1<<30
p (ObjectSpace.count_objects[:T_INTEGER]||0) - int_count
int = nil
GC.start
p (ObjectSpace.count_objects[:T_INTEGER]||0) - int_count
```
#### Before this patch:
```console
$ bin/mruby example.rb
1
1
```
#### After this patch:
```console
$ bin/mruby example.rb
1
0
```
Diffstat (limited to 'src/codedump.c')
0 files changed, 0 insertions, 0 deletions
