Is there any way to stop the garbage collector for some time?
I guess you are willing to avoid getting lagged by the gc. If this is the case, your question is similar to this one.
Basically you can't stop the gc but you can force a call using System.gc().
System.gc()