Remove existing object -


I have written some code like this.

  public zeros preview () {_printTemplate = New sea bunkerprintamatelet (); update info(); _printTemplate.SetInfo (); }  

Here I am creating a new object of _printTemplate whenever I call the preview () method, instead I have to check the existing object is available or avilable means that I have to destroy the existing and I will have to create new and used or in any other way.

I do not know the context in which it is used, but about it:

  public zeros preview () (if _printTemplate == zero) {_printTemplate = New MarineBunkerPrintTemplate ();} information update (); _printTemplate.SetInfo ();}  

Comments