class design question (inner classes)

Roberto Mariottini rmariottini at mail.com
Tue Sep 11 08:29:44 PDT 2007


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



More information about the Digitalmars-d mailing list