apeltsi / loitsu

Cross-platform Game Engine written in Rust
MIT License
1 stars 0 forks source link

Memory considerations (Per-scene VM) #6

Closed apeltsi closed 6 months ago

apeltsi commented 10 months ago

A new rune VM for every scene could make sense. This would lessen the impact of a potential memory leak. (from eventual reference cycles etc)

apeltsi commented 10 months ago

This could be quite a big problem, components should really never have a reference to eachother. So a rust function, implemented on the rust side, could fetch the component on-demand (through a hashmap that is a tree at the same time & is able to mutate while keeping the same ids)

apeltsi commented 9 months ago

Dropping components and entities on destruct could solve this (kinda)

apeltsi commented 6 months ago

no real end goal here