Assuming she really said methods, not fields, then your teacher is mistaken about this. As you say, garbage collection is the process of recovering memory from objects that have been allocated, the amount of the allocated method does not matter.
As a side note, static fields are another matter. Holding objects in a static field (usually) does not allow the garbage collector to perform its task, since the class will always refer to it, and therefore it will not have the right to collect it.
Paolo source share