arboard icon indicating copy to clipboard operation
arboard copied to clipboard

Is there a memory leak

Open hxcliff opened this issue 4 years ago • 10 comments

hxcliff avatar Sep 23 '21 07:09 hxcliff

It seems that memory is not freed after calling get_text() or get_image().

hxcliff avatar Sep 23 '21 07:09 hxcliff

It seems that other platforms are the same

I set_image a picture of about 5 mb size about 8 or 9 times, the whole program about 67mb. then found that the memory area 0x53e32400000-0x53e36000000 is basically the content of this picture data about 60mb. then there are some CLIPBOARD, CLIPBOARD_ MANAGER, ARBOARD_CLIPBOARD strings. I wonder if there is some memory leak or memory not freed in time. mem1

A comparison of the memory when the program is opened and after the completion of the set_image test shows that there is a clear exception in 53e32400000. mem2

hxcliff avatar Sep 23 '21 16:09 hxcliff

The memory dump file is here http://47.100.174.226:8080/s/vmIj

hxcliff avatar Sep 23 '21 16:09 hxcliff

Thanks for reporting this! I think I'll get to this after sorting out #23

ArturKovacs avatar Sep 26 '21 13:09 ArturKovacs

Thanks for reporting this! I think I'll get to this after sorting out #23

okay

hxcliff avatar Sep 29 '21 02:09 hxcliff

Hi, any progress so far?

hxcliff avatar Oct 11 '21 06:10 hxcliff

Unfortunately not. On that note: I'm intending to stop working on this crate.

ArturKovacs avatar Oct 11 '21 07:10 ArturKovacs

Unfortunately not. On that note: I'm intending to stop working on this crate.

Oh, not good news. Maybe I'll try to maintain one myself

hxcliff avatar Oct 11 '21 08:10 hxcliff

My share-clip project relies heavily on this crate

🥲

hxcliff avatar Oct 11 '21 08:10 hxcliff

I would definitely consider merging a PR if you find a solution to this.

ArturKovacs avatar Oct 11 '21 08:10 ArturKovacs

@morn-0 was you able to find the issue? I think I've run into this issue but for get_text() as well (have not tried get_image yet...).

mchaliadzinau avatar Feb 01 '23 20:02 mchaliadzinau

was you able to find the issue? I think I've run into this issue but for get_text() as well (have not tried get_image yet...).

Sorry, I haven't had the chance to delve deeper into this issue recently.

hxcliff avatar Feb 28 '23 05:02 hxcliff

I am going to close this issue since I'm not aware of any more memory leaks in arboard. All of the macOS ones have been removed (and tested) in previous releases. Thanks for reporting this before.

complexspaces avatar Feb 13 '24 00:02 complexspaces