|
Ruby 4.0.7p0 (2026-09-15 revision 229531a6cfbf07e3caef30dbac24a2a3f3fed482)
|
Function pointers. More...
Data Fields | |
| RUBY_DATA_FUNC | dmark |
| This function is called when the object is experiencing GC marks. | |
| RUBY_DATA_FUNC | dfree |
| This function is called when the object is no longer used. | |
| size_t(*) | dsize (const void *) |
| This function is to query the size of the underlying memory regions. | |
| RUBY_DATA_FUNC | dcompact |
| This function is called when the object is relocated. | |
| void * | reserved [1] |
| This field is reserved for future extension. | |
| RUBY_DATA_FUNC rb_data_type_struct::[struct].function dcompact |
This function is called when the object is relocated.
Like ::rb_data_type_struct::dmark, you need to update references to Ruby objects inside of your structs.
| RUBY_DATA_FUNC rb_data_type_struct::[struct].function dfree |
This function is called when the object is no longer used.
You need to do whatever necessary to avoid memory leaks.
| RUBY_DATA_FUNC rb_data_type_struct::[struct].function dmark |
This function is called when the object is experiencing GC marks.
If it contains references to other Ruby objects, you need to mark them also. Otherwise GC will smash your data.
| size_t(*) rb_data_type_struct::[struct].function(const void *) |
This function is to query the size of the underlying memory regions.
This field is reserved for future extension.
For now, it must be filled with zeros.