First of all, you cannot set objects to null. You can set variables to null. It's important to understand the difference between objects and variables. A variable* is a reference to an object - you can set it to the special value null which means that the variable is not pointing to an object.
There's almost never a good reason to manually set variables to null. You do not normally need to set variables to null to let the garbage collector free up the memory used by those objects.
So, you don't need a general-purpose method to clean up objects. Let the garbage collector do its job, don't clutter up your own program with unnecessary code that tries to help the garbage collector.
variable are like address cards. They hold the address to a house or building. If you pass a variable into a method, you can think of it as making a copy of the address card and handing that to the method. If you erase that 2nd card's contents, the first card still has its copy, and nothing changes on the actual building.
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors