Trouble destroying AIControllers

Apparently AIControllers refused to be destroyed under any conditions at all. Is there a particular reason why?

And how exactly are you trying to destroy AIController instances? And why? Share more info and you’ll get your answer in no time :smiley:

–mieszko

When Ai dies, I get the pawn to call the aicontroller to do stop destroy actor. I suceedrd in stopping the behavior tree using this manner but I realised the aicontroller remain in the scene outliner. Would this mean that if my game intends to be something like RTS, this would mean that the list of aicontroller would keep adding?

You don’t have to do anything with AIController when AI pawn dies. It will get cleared automatically by Garbage Collector, since it will no longer be referenced.

–mieszko

I’ve just tested this and apparently the AIController remains in the Scene Outliner long after pawn death. How often does the garbage collector do this? . Am I getting this wrong or is there a way to check for references dynamically during runtime?