mrtrizer / FlappyEngine

FlappyEngine is a component-based 2d game engine written in C++ and Js in early stage of development.
4 stars 0 forks source link

Components are not deinitialized before application closed #67

Closed mrtrizer closed 7 years ago

mrtrizer commented 7 years ago

This is a pain in the ass. This causes problems in deinitialization after app closing (components are not deinitialized properly. Also this problem makes pretty difficult to work with subtrees out of a main hierarchy.

mrtrizer commented 7 years ago

This could be solved if Entity in destructor will notify all child entities and components about destruction process and pass pure pointer to them. Or even simplier, just keep pure pointer to the parent Entity instead of SafePtr. This even can improve performance a bit.