Singletones should not be deleted dynamically: after they are created, they exist until the end of the life of the application. Singleton means that there is one and only one instance of it.
Even if your Singleton reserves a resource that you want to dynamically issue and re-reserve, you should not destroy and re-create an instance of Singleton. This will run counter to the general meaning and use of the template, which can (at best) cause communication problems in your team or (at worst) subtle errors in your application.
Instead, you can force a Singleton object to internally manage this resource: release it if it has not been used for some time, or if its reference count drops to 0.
Instead, you should use Factory to access this resource. This gives you much more freedom to control the processing of the resource in question. You can also reuse the created object internally, effectively keeping the number of objects no more than 1.
source share