What is the correct way to create and add components at runtime ?

If you are using array with pointer, please note by adding/removing elements to array, it’s content can get invalidated. That holds especially true for pointers… Eg if you plan to use and add dynamically to it, consider pre-allocate some space in array first. When array is resizing pointers might get lost…