Diamond

Results 461 comments of Diamond

I *believe* GJS also uses toggle references for this reason.

Also side note: Specifically for issue #106, referencing `window` inside the `destroy` signal callback will not work. This makes sense, as it's meant to be a destruction callback, so you...

> The thing with this example is that there is no additional reference taken. It is just the closure that prevents the GC of the element. Then what's the point...

> Python, JS, and rust bindings also leak in this case. The user has to resort to weak pointers here. I think in this case, I would be happy with...

> But if you want to show feedback then you'd need a handle to your app or similar, which then creates a circular reference again. This case is being handled...

> I don't understand how your case is handled if my example gives you headaches. How does your solution prevent something similar to this from being a cycle? I think...

FWIW, I agree that this PR might not work for GStreamer specifically, and I'd be happy to draft up some kind of opt-out mechanism for GStreamer objects to not be...

> Who holds a strong reference to the box if it gets moved to the intern weak part? If the box is intern-weaked, then that implies that the C side...

> Wait - the box holds the object, not the closure? > > The closure is saved in a global `Slab` here: https://github.com/diamondburned/gotk4/blob/4/pkg/core/gbox/box.go#L88 This isn't true. The box holds *both*...