Removing objects that collided - is my approach also possible?

Hello,
from what I understand, it is not correct to remove the objects that should be removed as result of a collision immediately, because one doesn’t know if they are not part of any other collision currently happening in the physics world.

The solution I saw around was based on calling timer.performWithDelay method and removing the objects in a function passed to this method. The time delay used was just 1ms.

Q1. Do I get it right that the 1ms should be enough time for all collision handling in given step to be completed?

I thought of other approach:
Q2. Is it possible and correct to mark the object to be removed (e.g. by setting its attribute or putting reference into table of objects to be removed) and in the beginning of the event listener for enterFrame event I remove all such marked objects?

(I prefer using OOP approach, therefore I talk about objects all the time.)
[import]uid: 164599 topic_id: 29230 reply_id: 329230[/import]

You can use a time delay of you can use if event.phase == “ended” then in the collision function and removing in the ended phase. [import]uid: 52491 topic_id: 29230 reply_id: 117544[/import]