Skip to content

Instance registry #213

@uvlad7

Description

@uvlad7

It's not a some specific bug, actually, I just want to discuss instance registry problems highlighted in the docs.

There could be a window where a Ruby object is marked for deletion but the underlying C++ object is returned back to Ruby

I feel like it's possible to reuse ObjectSpace._id2ref logic here, and take a look on how gc frees T_DATA. Or maybe use weakmap.

Ruby instance may be freed on the C++ side

Is it possible to enable the registry only for Ruby-managed instances? Maybe use Ruby's xmalloc somehow?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions