Skip to content

Memory leaks when passing Drop objects to msg_send! #80

Description

@scoopr

This is further investigation on SSheldon/rust-objc-foundation#9
I made an additional test to rust-objc that shows the issue here scoopr@b637c96.
It has a minimal wrapper around the type that implements Drop, and then when used as an argument to msg_send!, it seems the drop is then never called. Using it just as a receiver for a method call does seem to work as expected.

I'm still not sure if the wrapper is wrong, or if there is a bug in msg_send!, or something else, but the fact is that there already is bunch of code that expects the drop to happen, and it would be really nice to have a solution without leaks :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions