Tag garbage-collection

[Solved] Garbage collector in java

At least two, potentially all three of them. Since the local variables are not used after line 11 the JVM is free to set them to null, and they become eligible for garbage collection. From JLS 12.6.1: Optimizing transformations of…

[Solved] Destroying the form [closed]

You should call Dispose(). Even if that doesn’t mean all memory gets freed immediately, all resources opened by the form (timers, files, etc.) should be closed then, if the form is programmed properly. Of course, the form will also be…