Im creating an application that has multithreaded classes to count to a user specified number. Im making it so that every time the class is initiated the user specified number is passed to the constructor.
This means that the threads can only be run once since the instantiation of the class is based on the user specified number.
I would like to know if it’s possible to delete the instance of the class when it has finished counting and then create another one with the same name.
Just finally mark class
reference as nullonce you are done. so it will automatically be eligible forGarbage Collection