Destroy() Runtime Error (C++)

I have created an array of pawns which are placed in the World, when they hit something, they are destroyed.

I noticed that the line which produces the error when trying to play it is: Cars[i]->Destroy()

When I call a Destroy() inside the class the error disappear, (I think that when it pawns the object, the returned object is different from the one which is store in the TArray) Am I true? if is that is correct what is the best way to store the blueprint?

Would you help me, please?

Couple of suggestions here.

Have you tried holding a reference to the object to be destroyed, removing it from the array, then destroying it after? On my phone so take this code as prototype.

AActor* toBeDestroyed = Cars[i];

Cars.RemoveAt(i);

toBeDestroyed->Destroy();

Also, iirc there is another method for actor destruction which could be used
BeginDestroyActor or something like that. All that should do is Mark the actor for destruction during the next gc

Let me know if either of those methods work. Also, if you can provide the runtime error it would help.

Godspeed developer

Sorry, It is still closing the editor and has not any message to give you more informaction