coxalan wrote: [...] > This is definitely more elegant than the first example. But here, every object of type "s.Permutation" stores a reference to the object "s", which I want to avoid. You can simply declare the inner class as static. This way it won't store a reference to its container class. Ciao