`PooledClass` looks for `destructor` on each instance it releases.
166081
function () {
	    var Interface = this.constructor.Interface;
	    for (var propName in Interface) {
	      if (process.env.NODE_ENV !== 'production') {
	        Object.defineProperty(this, propName, getPooledWarningPropertyDefinition(propName, Interface[propName]));
	      } else {
	        this[propName] = null;
	      }
	    }
	    for (var i = 0; i < shouldBeReleasedProperties.length; i++) {
	      this[shouldBeReleasedProperties[i]] = null;
	    }
	    if (process.env.NODE_ENV !== 'production') {
	      Object.defineProperty(this, 'nativeEvent', getPooledWarningPropertyDefinition('nativeEvent', null));
	      Object.defineProperty(this, 'preventDefault', getPooledWarningPropertyDefinition('preventDefault', emptyFunction));
	      Object.defineProperty(this, 'stopPropagation', getPooledWarningPropertyDefinition('stopPropagation', emptyFunction));
	    }
	  }
383176
def is_class_sealed(klass):
    
    mro = inspect.getmro(klass)
    new = False

    if mro[-1] is object:
        mro = mro[:-1]
        new = True

    for kls in mro:
        if new and '__dict__' in kls.__dict__:
            return False

        if not hasattr(kls, '__slots__'):
            return False

    return True
1305870
@Override
	public Iterator<Class> getClassesToDeleteIterator() {
		if (fixture instanceof CleanableFixture) {
			return cleanableFixture().getClassesToDeleteIterator();
		}

		return Collections.<Class>emptyList().iterator();
	}
103109
def instance_cache(cls, func):
        

        @functools.wraps(func)
        def func_wrapper(*args, **kwargs):
            if not args:
                raise ValueError('`self` is not available.')
            else:
                the_self = args[0]
            func_key = cls.get_key(func)
            val_cache = cls.get_self_cache(the_self, func_key)
            lock = cls.get_self_cache_lock(the_self, func_key)

            return cls._get_value_from_cache(
                func, val_cache, lock, *args, **kwargs)

        return func_wrapper
1009502
@Override
    public ConstantPoolGen analyze(IAnalysisCache analysisCache, ClassDescriptor descriptor) throws CheckedAnalysisException {
        ClassGen classGen = new ClassGen(analysisCache.getClassAnalysis(JavaClass.class, descriptor));
        return classGen.getConstantPool();
    }
971536
void checkClasses(ClassFile cf, CPEntries entries) throws ConstantPoolException {
        for (ConstantPool.CONSTANT_Class_info ci : entries.classes) {
            String name = nameFromRefType(ci.getName());
            if (name != null) {
                DeprData dd = db.getTypeDeprecated(name);
                if (dd != null) {
                    printType("scan.out.usesclass", cf, name, dd.isForRemoval());
                }
            }
        }
    }
956024
private void tearDownObjectsToExecute(final Map<Class<?>, Object> objects,
			final BenchmarkResult res) {

		// executing tearDown for all clazzes registered in given Map
		for (final Class<?> clazz : objects.keySet()) {
			final Object objectToUse = objects.get(clazz);
			if (objectToUse != null) {
				// executing AfterClass for all objects.
				Method afterClassMeth = null;
				try {
					afterClassMeth = BenchmarkMethod
							.findAndCheckAnyMethodByAnnotation(clazz,
									AfterBenchClass.class);
				} catch (final PerfidixMethodCheckException e) {
					res.addException(e);
				}
				// if afterClassMethod exists, the method will be executed and
				// possible failures will be stored in the BenchmarkResult
				if (afterClassMeth != null) {
					final PerfidixMethodCheckException afterByCheck = BenchmarkExecutor
							.checkMethod(objectToUse, AfterBenchClass.class,
									afterClassMeth);
					if (afterByCheck == null) {
						final PerfidixMethodInvocationException afterByInvok = BenchmarkExecutor
								.invokeMethod(objectToUse,
										AfterBenchClass.class, afterClassMeth);
						if (afterByInvok != null) {
							res.addException(afterByInvok);
						}
					} else {
						res.addException(afterByCheck);
					}
				}
			}
		}
	}
839917
private LinkedList<Class> getClassesToDelete() {
		LinkedHashSet<Class> classesToDelete = new LinkedHashSet<Class>();

		for (Object object : getObjects()) {
			classesToDelete.add(object.getClass());
		}

		return new LinkedList<Class>(classesToDelete);
	}
372927
private static Class<?> desc2class(ClassLoader cl, String desc)
			throws ClassNotFoundException {
		switch (desc.charAt(0)) {
		case JVM_VOID:
			return void.class;
		case JVM_BOOLEAN:
			return boolean.class;
		case JVM_BYTE:
			return byte.class;
		case JVM_CHAR:
			return char.class;
		case JVM_DOUBLE:
			return double.class;
		case JVM_FLOAT:
			return float.class;
		case JVM_INT:
			return int.class;
		case JVM_LONG:
			return long.class;
		case JVM_SHORT:
			return short.class;
		case 'L':
			desc = desc.substring(1, desc.length() - 1).replace('/', '.'); // "Ljava/lang/Object;"
																			// ==>
																			// "java.lang.Object"
			break;
		case '[':
			desc = desc.replace('/', '.'); // "[[Ljava/lang/Object;" ==>
											// "[[Ljava.lang.Object;"
			break;
		default:
			throw new ClassNotFoundException("Class not found: " + desc);
		}

		if (cl == null)
			cl = getClassLoader();
		Class<?> clazz = DESC_CLASS_CACHE.get(desc);
		if (clazz == null) {
			clazz = Class.forName(desc, true, cl);
			DESC_CLASS_CACHE.put(desc, clazz);
		}
		return clazz;
	}
327498
private void findAllModifiedClasses(String name,
                                      PathImpl sourceDir,
                                      PathImpl classDir,
                                      String sourcePath,
                                      ArrayList<String> sources)
    throws IOException, ClassNotFoundException
  {
    String []list;

    try {
      list = sourceDir.list();
    } catch (IOException e) {
      return;
    }

    for (int i = 0; list != null && i < list.length; i++) {
      if (list[i].startsWith("."))
        continue;

      if (_excludedDirectories.contains(list[i]))
        continue;
      
      PathImpl subSource = sourceDir.lookup(list[i]);

      if (subSource.isDirectory()) {
        findAllModifiedClasses(name + list[i] + "/", subSource,
                               classDir.lookup(list[i]), sourcePath, sources);
      }
      else if (list[i].endsWith(_sourceExt)) {
        int tail = list[i].length() - _sourceExt.length();
        String prefix = list[i].substring(0, tail);
        PathImpl subClass = classDir.lookup(prefix + ".class");

        if (subClass.getLastModified() < subSource.getLastModified()) {
          sources.add(name + list[i]);
        }
      }
    }

    if (! _requireSource)
      return;
    
    try {
      list = classDir.list();
    } catch (IOException e) {
      return;
    }

    for (int i = 0; list != null && i < list.length; i++) {
      if (list[i].startsWith("."))
        continue;

      if (_excludedDirectories.contains(list[i]))
        continue;
      
      PathImpl subClass = classDir.lookup(list[i]);

      if (list[i].endsWith(".class")) {
        String prefix = list[i].substring(0, list[i].length() - 6);
        PathImpl subSource = sourceDir.lookup(prefix + _sourceExt);

        if (! subSource.exists()) {
          String tail = subSource.getTail();
          boolean doRemove = true;

          if (tail.indexOf('$') > 0) {
            String subTail = tail.substring(0, tail.indexOf('$')) + _sourceExt;
            PathImpl subJava = subSource.getParent().lookup(subTail);

            if (subJava.exists())
              doRemove = false;
          }

          if (doRemove) {
            log.finer(L.l("removing obsolete class '{0}'.", subClass.getPath()));

            subClass.remove();
          }
        }
      }
    }
  }
599983
def _teardown(self):
        '''
        
        '''
        if not self._was_object_method:
            setattr(self._instance, self._attr, self._obj)
        else:
            delattr(self._instance, self._attr)
431723
ClassSymbol readClassSymbol(int i) {
        Object obj = readPool(i);
        if (obj != null && !(obj instanceof ClassSymbol))
            throw badClassFile("bad.const.pool.entry",
                               currentClassFile.toString(),
                               "CONSTANT_Class_info", i);
        return (ClassSymbol)obj;
    }
1010625
public void releaseAllResources()
    {
        super.releaseAllResources();
        synchronized (poolSynch)
        {
            if (!poolMap.isEmpty())
            {
                Collection pools = poolMap.values();
                Iterator iterator = pools.iterator();
                ObjectPool op = null;
                while (iterator.hasNext())
                {
                    try
                    {
                        op = (ObjectPool) iterator.next();
                        op.close();
                    }
                    catch (Exception e)
                    {
                        log.error("Exception occured while closing ObjectPool " + op, e);
                    }
                }
                poolMap.clear();
            }
            dsMap.clear();
        }
    }
934
def iterclass(cls):
    
    for field in dir(cls):
        if hasattr(cls, field):
            value = getattr(cls, field)
            yield field, value
1205844
def classes(
            self,
            name=None,
            function=None,
            header_dir=None,
            header_file=None,
            recursive=None,
            allow_empty=None):
        """"""
        return (
            self._find_multiple(
                self._impl_matchers[scopedef_t.class_],
                name=name,
                function=function,
                decl_type=self._impl_decl_types[
                    scopedef_t.class_],
                header_dir=header_dir,
                header_file=header_file,
                recursive=recursive,
                allow_empty=allow_empty)
        )
496683
function destroyInstance() {
  const {
    selection, datum, destroy, index,
  } = getInstance(this);
  selection.selectAll('*').each(destroyDescendant);
  const transition = destroy(selection, datum, index);
  (transition || selection).remove();
}
876260
def cached_per_instance():
    

    def cache_fun(fun):
        argspec = inspect2.getfullargspec(fun)
        arg_names = argspec.args[1:] + argspec.kwonlyargs  # remove self
        kwargs_defaults = get_kwargs_defaults(argspec)
        cache = {}

        def cache_key(args, kwargs):
            return get_args_tuple(args, kwargs, arg_names, kwargs_defaults)

        def clear_cache(instance_key, ref):
            del cache[instance_key]

        @functools.wraps(fun)
        def new_fun(self, *args, **kwargs):
            instance_key = id(self)
            if instance_key not in cache:
                ref = weakref.ref(self, functools.partial(clear_cache, instance_key))
                cache[instance_key] = (ref, {})
            instance_cache = cache[instance_key][1]

            k = cache_key(args, kwargs)
            if k not in instance_cache:
                instance_cache[k] = fun(self, *args, **kwargs)
            return instance_cache[k]

        # just so unit tests can check that this is cleaned up correctly
        new_fun.__cached_per_instance_cache__ = cache
        return new_fun

    return cache_fun