From koffice Mon May 22 18:08:37 2000 From: Waldo Bastian Date: Mon, 22 May 2000 18:08:37 +0000 To: koffice Subject: Re: KSpread cells X-MARC-Message: https://marc.info/?l=koffice&m=95901891631255 On Mon, 22 May 2000, Werner Trobin wrote: > What about one (yes, really one per application -> singleton) > Pool which handles all the shared objects (format, precision,...) > and their creation/deletion? > > You'd need that Pool (singleton, like KoFilterManager) and a Reference > Counting base class. Then you'd derive all the shared "data-classes" > from this base class. > Every method which changes the properties of the object queries if > that changed object exists or creates a new object... > I don't know about the performance and memory savings of this solution, > but by changing some implementation details (e.g. don't query for > existing objects with the same properties, but simply "copy on write") > one can trade memory for speed and vice versa (wow - this sounds > familiar :). Hey, it looks like you already read my previous mail which I'm going to send you :-) QString uses the same copy-on-write semantics btw. Cheers, Waldo