Destroy Immediate

I noticed that when I wrote a method that ran an if statement and had it destroy a gameobject then right after the if statement I called the FindGameObjects method and it still found the gameobject. That makes sense as the Destroy method is delayed until the end. I thought about the DestroyImmediate method in place of Destroy, but the docs warn against use of it. Would this be a time to use that? What is good/bad about it?

P.S. I already made a workaround, I’m just wondering about the use of DestroyImmediate.

From the docs:
This function should only be used when writing editor code since the delayed destruction will never be invoked in edit mode. In game code you should use Object.Destroy instead. Destroy is always delayed (but executed within the same frame). Use this function with care since it can destroy assets permanently! Also note that you should never iterate through arrays and destroy the elements you are iterating over. This will cause serious problems (as a general programming practice, not just in Unity).

From me:
Although I’ve never seen DestroyImmediate crash a project, I tend to follow Unity’s instructions and usually create a ‘toBeDestroyed’ boolean in a case like yours.