fix crash on view destruction because of non-deterministic cleanup of objects

Authored by cullmann on Jul 21 2017, 9:58 PM.