Esempio n. 1
0
 /** Finalize. */
 protected void finalize() throws Throwable {
   try {
     this.dispose();
   } finally {
     super.finalize();
   }
 }
Esempio n. 2
0
 /**
  * Destroy the native peer instance.
  *
  * <p>Normally this method is called from {@link Script#finalize()}. If it is called before
  * finalization, only {@link Script#finalize()} can safely be called on the instance subsequently.
  */
 protected void dispose() {
   //
   // scriptPeer isn't an owning reference; we can just set it to 0.
   //
   if (this.scriptPeer != 0) {
     this.scriptPeer = 0;
   }
   super.dispose();
 }