Skip to content

Instantly share code, notes, and snippets.

View rsnape's full-sized avatar

J. Richard Snape rsnape

  • De Montfort University
  • Leicester
View GitHub Profile
@davidism
davidism / class_scope.py
Created July 27, 2016 15:03
class namespace scope
a = 'global'
class Fred:
a = 'class'
b = (a for i in range(10))
c = [a for i in range(10)]
d = a
e = lambda: a
f = lambda a=a: a
@dpryden
dpryden / ClassLoaderLeakExample.java
Created October 20, 2014 00:01
Example of a ClassLoader leak in Java
import java.io.IOException;
import java.net.URLClassLoader;
import java.nio.file.Files;
import java.nio.file.Paths;
import java.nio.file.Path;
/**
* Example demonstrating a ClassLoader leak.
*
* <p>To see it in action, copy this file to a temp directory somewhere,