yswift icon indicating copy to clipboard operation
yswift copied to clipboard

Memory leak on subscriptions

Open fbarbat opened this issue 1 year ago • 2 comments

As discussed in https://github.com/y-crdt/yswift/pull/44#discussion_r1543872104, running this test causes memory to steadily increase if looking at Activity Monitor.

    func test_allocateTooMany() {
        for i in 1...1000000000 {
            let s = text.observe { _ in }
            text.unobserve(s)
        }
    }

This is pointing to a leak somewhere. I don't know if it is Yswift itself or Yrs.

fbarbat avatar Apr 02 '24 19:04 fbarbat

thanks for opening a new issue with this @fbarbat

heckj avatar Apr 02 '24 19:04 heckj

I'll check it on the yrs side.

Horusiath avatar Apr 03 '24 02:04 Horusiath