Closed ZOulhadj closed 1 year ago
What seems to be the issue is that each instance has a pointer to a model. When a new model is added then the underlying vector that holds all the models may reallocate and therefore, the memory address will change. This results in potentially undefined behaviour.
This has been solved for now as I am simply using index positions in the vector rather than pointers which may change. The implementation will change as the project requirements are better understood.
When a model is already loaded and there is at least one instance, adding a new model will remove the instances model.