[fpc-devel] Unicodestring branch, please test and help fixing
Marco van de Voort
marcov at stack.nl
Wed Sep 10 12:17:21 CEST 2008
In our previous episode, Graeme Geldenhuys said:
> > this ever save memory?
>
> Please read the following...
>
> http://exciton.cs.rice.edu/JavaResources/DesignPatterns/FlyweightPattern.htm
>
> http://en.wikipedia.org/wiki/Flyweight_pattern
>
> Design Patterns - Elements of Reusable Object-Oriented Software
> (aka GOF book)
> "Most contemporary document editors don't use an object for every
> character, presumably for efficiency reasons. Calder demonstrated that
> this approach is feasible in his thesis [Cal93]. Calder's glyphs can
> be shared to reduce storage costs, thereby forming directed-acyclic
> graph structures. We can apply the Flyweight pattern to get the same
> effect." ? A Case Study (chapter)
>
> [Cal93] - Paul R. Calder. Building User Interfaces with Lightweight
> Objects. PhD thesis, Stanford University, 1993.
Like everybody, I have read GOF several times, and even got some of the
successor books.
The problem is how it applies to strings, and how they can be more
memory saving than a straight array of 16-bit values which are
copy-on-write.
More information about the fpc-devel
mailing list