As I understand things that shouldn’t be safe, I didn’t think that the outer contributed to reference counting by default. So I’m surprised it’s working. Anyway, to be safe, just call AddToRoot()
on your object immediately after creating it. This will make sure it remains referenced for the duration your program runs.