adriengivry / Overload

3D game engine with lua scripting
https://overloadengine.org/
MIT License
1.76k stars 226 forks source link

Use of RAII idiom for the WidgetContainer class #281

Open maxbrundev opened 10 months ago

maxbrundev commented 10 months ago

Description Currently the WidgetContainer class use raw pointers and users has to de-allocate memory manually.

Expected behavior We should replace the usage of raw pointers by unique_ptr and be able to transfer the ownership of an allocated Widget to an another WidgetContainer. The EMemoryMode should be also removed since there is no use case of concrete shared ownership of Widgets