openfl/openfl-native — pull request #189 by raggy (2014-02-17 15:04:46+00:00)
Title: Set parent = null after dispatching events

To be consistent with Flash, DisplayObject.parent (and DisplayObject.stage) should not be null until after the Event.REMOVED and Event.REMOVED_FROM_STAGE events have been dispatched.

This does introduce the possibility of an infinite loop if you do parent.removeChild(child) in an event handler, but, again, this is consistent with the way Flash behaves!