Which version are you using?
And how large is the freeze when you are not using deep profiling?
You respond very quickly.
It was creating a grid graph larger than I intended, so I’ll fix that. However, with OnApplicationQuit you could skip the destructor calls.
I’d rather not. Some games may depend in some odd ways on the graphs being destroyed properly.
Or it may lead to memory leaks if the user cancels the quit request (which I’ve heard is possible in some cases).
What do you think about a Debug.LogWarning() if the grid graph is some insane size?
There is already an artificial limit of 1024*1024 nodes. Some games use graphs that large though.
OK thanks for the quick answers.