At what times is it good to clear the memory?
Never. I've answered this before .
Is the ideal time to open and close the screen?
Never!
On all buttons on the screen?
Never!
What problems can be caused by overuse of GC?
Pauses and loss of performance.
What harm can it do to free up memory?
That's the real question that needs to be asked. The problem is more in making the manual release of memory than in leaving without doing. Pauses will be more frequent and longer. If there was a memory problem, there is now a management problem. I will not go into detail because this is already explained in the other question.
It may be overkill in memory usage due to wrong architecture or failure to release. The release is automatic, but the programmer has to know how to do it. It can not keep references to objects.
Real problem
I have seen cases of one window calling another that calls the first one, there it turns into a terrible vicious cycle. But most cases are not so terrible, but objects are kept alive for longer than they need.
There are cases that leave leaking more time than it should. You have pre-need explicit-release objects, at least using using
.
I see most programmers doing code without thinking about how it works. They just want to see the result. That does not work. It takes planning. Without knowing how everything works is at the mercy of coincidence. It can work or not.
I do not know what the case is about this application, but it is possible that it has serious problems managing the objects. Maybe you'll have to do a profiling . have tools for this:
You can not rule out the possibility that the application simply needs more memory. There are cases like this. But before investing in hardware you need to make sure you have solved all of the software.
Now you have better grants to start thinking about the right problem and who knows how to ask specific questions.