C++: DestroyComponent crashes program.

Use this

arr[i].box_component = nullptr;

instead of this

DestroyComponent()

left GC do its work…

1 Like