s207152
November 28, 2024, 6:29pm
1
Hi all,
I have found that calling observer.remove
may or may not work.
Here is the repro:
The sphere should always stop when y position >= 2, but sometimes it just won’t stop.
On the other hand, calling observable.remove(observer)
always works.
1 Like
labris
November 28, 2024, 7:19pm
2
sebavan
November 28, 2024, 10:21pm
3
You are totally right it looks like in some cases, deref gets Garbage Collected to early… I ll push a fix: Fix deref being GCed too early by sebavan · Pull Request #15909 · BabylonJS/Babylon.js · GitHub
cc @Deltakosh FYI
2 Likes
sebavan
November 28, 2024, 10:22pm
4
Thanks a lot for the report @s207152
riven04
November 29, 2024, 4:02pm
5
Just bumped into this as well, Observable.remove() works fine but Observer.remove() doesn’t. Thank you for fixing this, hope we can get that released soon.
s207152
November 29, 2024, 4:05pm
6
I think the fix is already included in 7.37.0. You may check it out.
2 Likes
riven04
November 29, 2024, 4:11pm
7
It is! I was loosing my mind over this for a while lol