From: David Alan Black Date: 2002-07-10T08:11:47+09:00 Subject: Re: Are class variables (and methods) reconstructed in each class instanciation? Hi -- On Wed, 10 Jul 2002, Chris Reay wrote: > In this example ... > > class MyClass > @@myClassVar = [0,1,2,3,4,5,6,7,8, ... 999] > > blah, blah, blah > end > > .... is the class variable @@myClassVar constructed for _each_ instance > of MyClass, or only _once_ and referenced by all other instances? I > ask because I plan a class with some large class variables and/or > methods and am concerned about the effect on performance of > instanciating very many objects of the class. The class variable will be created only once (including any possible subclasses of MyClass, which will share exactly the same class variable). David -- David Alan Black home: dblack@candle.superlink.net work: blackdav@shu.edu Web: http://pirate.shu.edu/~blackdav