Lurk/clink

memory leak

Lurk opened this issue · 3 comments

Lurk commented

At least in MacOs.

To reproduce lower sleep_duration in config

Lurk commented

Status update

I found it and figured out how to fix it, but.
I am using clipboard and the leak is there. Here is exact location. Since Rust does not know if this pointer is still used by Objective C API and vice versa, nobody newer frees it. This is the main problem. The second problem is - every mac os clipboard I have found on GitHub is a direct copy of Avraham Weinstock's implementation or some derivative with the same memory problem.

So yeah, I am preparing a pull request.

Lurk commented

Status update 2

I was wrong. It was still leaking, but now I am certain that I may be fixed it. At least 0.6.1 should not leak on mac os anymore

Here is how Lurk/rust-clipboard@945d82e

Lurk commented

Here is full write up for the history https://barhamon.com/post/rust_and_nsstring