An object can be garbage collected if it can no longer be reached. If there was some way for you to even check if the object is still alive then the garbage collector would be flawed, as long as you can reach the object it should not be collected.
The garbage collector runs after every request, but an object like this shouldn't and won't be collected.
The only way to deliberately fool it is by keeping a reference to an object in some static variable or custom thread in a java action and not adding it to the java action rootset. This is all pretty advanced stuff and I wouldn't worry about it too much. If you ever have to do something like this you can read about what to do at https://world.mendix.com/display/refguide4/Garbage+collection