Any overriding implementation must call super.close() first.
359994
@Override
	public void close() throws IOException {
		boolean enqueueOnSocketClose;
		synchronized(closeLock) {
			if(closeTime == null) {
				// Remove this from the context
				socketContext.onClose(this);
				closeTime = System.currentTimeMillis();
				enqueueOnSocketClose = true;
			} else {
				enqueueOnSocketClose = false;
			}
		}
		if(enqueueOnSocketClose) {
			Future<?> future = listenerManager.enqueueEvent(
				new ConcurrentListenerManager.Event<SocketListener>() {
					@Override
					public Runnable createCall(final SocketListener listener) {
						return new Runnable() {
							@Override
							public void run() {
								listener.onSocketClose(AbstractSocket.this);
							}
						};
					}
				}
			);
			try {
				logger.log(Level.FINE, "Waiting for calls to onSocketClose to complete");
				future.get();
				logger.log(Level.FINE, "All calls to onSocketClose finished");
			} catch(ExecutionException e) {
				logger.log(Level.SEVERE, null, e);
			} catch(InterruptedException e) {
				logger.log(Level.SEVERE, null, e);
				// Restore the interrupted status
				Thread.currentThread().interrupt();
			}
		}
		listenerManager.close();
	}
50062
public synchronized void close()
	{
		if (s != null) {
			super.close();
			try {
				s.close();
			}
			catch (final IOException e) {}
			s = null;
		}
	}
417018
def exit(self):
        """"""
        if self._thread is not None:
            self._thread.stop()
        # Call the father class
        super(Plugin, self).exit()
1292821
@Override
	public void close() {
		if (leaf != null) {
			leaf.close();
			leaf = null;
		}
		dirsMayBeUpdated = null;
	}
33269
@Override
    public void close() throws IOException
    {
        if (out != null)
        {
            out.close();
            out = null;
        }
        if (in != null)
        {
            in.close();
            in = null;
        }
    }
386544
public void setExtends(String superType) {
		if (!Strings.isEmpty(superType)
				&& !Event.class.getName().equals(superType)) {
			JvmParameterizedTypeReference superTypeRef = newTypeRef(this.sarlEvent, superType);
			JvmTypeReference baseTypeRef = findType(this.sarlEvent, Event.class.getCanonicalName());
			if (isSubTypeOf(this.sarlEvent, superTypeRef, baseTypeRef)) {
				this.sarlEvent.setExtends(superTypeRef);
				return;
			}
		}
		this.sarlEvent.setExtends(null);
	}
1300380
public void preClose() {
    if (explicitClosed.compareAndSet(false, true)) {
      proxy.lock.lock();
      try {
        removeListenerFromSchedulers();

        //closing connections
        closeConnection(waitNewSecondaryProtocol.getAndSet(null));
        closeConnection(waitNewMasterProtocol.getAndSet(null));
        closeConnection(masterProtocol);
        closeConnection(secondaryProtocol);
      } finally {
        proxy.lock.unlock();
      }
    }
  }
909482
@Override public void close() {
    if (parent != null) parent.remove(this);
    setState(State.DISPOSED);
    setBatch(null);
  }
884954
public void close() {
    // Close the underlying streams
    super.close();

    // Close the socket
    if (socket != null) {
      try {
        socket.close();
      } catch (IOException iox) {
        LOGGER.warn("Could not close socket.", iox);
      }
      socket = null;
    }
  }
174199
public void close() {
    try {
      if (is != null) is.close();
    } catch (IOException e) {
      log.error(null, e);
      throw new RuntimeException(e);
    }
    isClosed = true;
  }
1037953
function(name) {
    if (this[name]) {
      this[name].apply(this, [].slice.call(arguments, 1));
    }
    this._super.apply(this, arguments);
  }
738374
@Override
	public void close() {
		transactionManager.close();
		if (coverageHandlerRef.get() != null) {
			coverageHandlerRef.get().onSqlAgentClose();
		}
	}
814616
public void close()
    {
        if (m_mapTable != null)
        {
            Iterator<BaseTable> iterator = this.getTables();
            while (iterator.hasNext())
            {
                BaseTable table = iterator.next();
                if ((table != null) && (table != this.getNextTable()))
                {
                    Record record = table.getRecord();
                    if (record != null)
                        record.close();
                }
            }
        }
        if (m_tableNext != null)
            m_tableNext.close();
        super.close();
    }
447324
@Override
    public void destroy() {
        try {
            super.destroy();
        } finally {
            if (myOwnKafkaClient && defaultKafkaClient != null) {
                try {
                    defaultKafkaClient.destroy();
                } catch (Exception e) {
                    LOGGER.warn(e.getMessage(), e);
                } finally {
                    defaultKafkaClient = null;
                }
            }
        }
    }
549996
private void tryReplaceSuper(Node superNode) {
    checkState(!superclasses.isEmpty(), "`super` cannot appear outside a function");
    Optional<Node> currentSuperclass = superclasses.peek();
    if (!currentSuperclass.isPresent() || !currentSuperclass.get().isQualifiedName()) {
      // either if a) we're in a static class fn without an 'extends' clause or b) we're not in
      // a static class function
      return;
    }

    Node fullyQualifiedSuperRef = currentSuperclass.get().cloneTree();
    superNode.replaceWith(fullyQualifiedSuperRef);
    compiler.reportChangeToEnclosingScope(fullyQualifiedSuperRef);
  }
195340
public void close() throws IOException {
        if (!_closed) {
            try {
                flush();
            } catch (Throwable t) {
                LOG.debug(t.getMessage(), t);
            }
            _closed = true;
            super.close();
        }
    }
1016541
public static void close(Closeable a) {
        try {
            if (a != null) {
                a.close();
            }
        } catch (Exception e) {
            throw wrap(e);
        }
    }