Hi
Is there any chance you could send the “finalize” event immediately when the object is removed?
Right now it is sent in the next frame and… well that’s not working for me because it’s too late.
Krystian
Hi
Is there any chance you could send the “finalize” event immediately when the object is removed?
Right now it is sent in the next frame and… well that’s not working for me because it’s too late.
Krystian
Hi Krystian,
Can you explain what you’re working on and attempting to do? And why this event is “too late” on the following frame?
Thanks,
Brent
Hello Brent
for example timers and transitions.
When objects are removed we want to cancel some timers and transitions.
If this is done in the next frame, I think it’s possible that some of the onComplete or timer callbacks will fire, and we definitely don’t want that to happen.
I’m not talking only about transitions on the object which is removed, but it’s quite often that we cancel transitions on different objects.
Thanks
Krystian
Hi @krystian6,
I spoke to the engineers and can report as follows: the “finalize” event is deferred to the next render pass for performance reasons. This is by design. The name “finalize” is actually appropriate here, and it works very similarly to how finalizers work in Java, .NET (C#/VB), and Objective-C in that 1) it doesn’t happen immediately, and 2) you cannot make assumptions about the finalize order of objects.
I’m not sure how you’re handling transitions and timers and such, but you’ll need to work with this methodology in your app.
Take care,
Brent
Hi Krystian,
Can you explain what you’re working on and attempting to do? And why this event is “too late” on the following frame?
Thanks,
Brent
Hello Brent
for example timers and transitions.
When objects are removed we want to cancel some timers and transitions.
If this is done in the next frame, I think it’s possible that some of the onComplete or timer callbacks will fire, and we definitely don’t want that to happen.
I’m not talking only about transitions on the object which is removed, but it’s quite often that we cancel transitions on different objects.
Thanks
Krystian
Hi @krystian6,
I spoke to the engineers and can report as follows: the “finalize” event is deferred to the next render pass for performance reasons. This is by design. The name “finalize” is actually appropriate here, and it works very similarly to how finalizers work in Java, .NET (C#/VB), and Objective-C in that 1) it doesn’t happen immediately, and 2) you cannot make assumptions about the finalize order of objects.
I’m not sure how you’re handling transitions and timers and such, but you’ll need to work with this methodology in your app.
Take care,
Brent