Skip to content

Commit bfd5aa3

Browse files
committed
1 parent aebe51a commit bfd5aa3

File tree

4 files changed

+8
-10
lines changed

4 files changed

+8
-10
lines changed

book/component.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ communication paths if you need them.
690690
got them laid out in memory in the most efficient way for your
691691
CPU to read them.
692692

693-
This is a rare hat trick in architecture: your code is both more
693+
This is a rare win-win in architecture: your code is both more
694694
maintainable *and* faster.
695695

696696
* The open source <a href="http://www.delta3d.org/">Delta3D</a>

book/singleton.markdown

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,10 @@ instance. All together, the classic implementation looks like this:
7272
The static `instance_` member holds an instance of the class, and the
7373
private constructor ensures that it is the *only* one. The public
7474
static `instance()` method grants access to the instance from anywhere
75-
in the codebase. It is also responsible for creating the instance
76-
using lazy initialization: it instantiates the Singleton the first
77-
time someone asks for it.
75+
in the codebase. It is also responsible for instantiating the
76+
singleton instance lazily the first time someone asks for it.
7877

79-
A more modern update on this is like so:
78+
A modern take looks like this:
8079

8180
^code local-static
8281

html/component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1010,7 +1010,7 @@ <h2><a href="#see-also" name="see-also">See Also</a></h2>
10101010
components of the same type and put them in an array, now you&#x2019;ve
10111011
got them laid out in memory in the most efficient way for your
10121012
CPU to read them.</p>
1013-
<p>This is a rare hat trick in architecture: your code is both more
1013+
<p>This is a rare win-win in architecture: your code is both more
10141014
maintainable <em>and</em> faster.</p>
10151015
</li>
10161016
<li>

html/singleton.html

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,10 +136,9 @@ <h3><a href="#providing-a-global-point-of-access" name="providing-a-global-point
136136
<p>The static <code>instance_</code> member holds an instance of the class, and the
137137
private constructor ensures that it is the <em>only</em> one. The public
138138
static <code>instance()</code> method grants access to the instance from anywhere
139-
in the codebase. It is also responsible for creating the instance
140-
using lazy initialization: it instantiates the Singleton the first
141-
time someone asks for it.</p>
142-
<p>A more modern update on this is like so:</p>
139+
in the codebase. It is also responsible for instantiating the
140+
singleton instance lazily the first time someone asks for it.</p>
141+
<p>A modern take looks like this:</p>
143142
<div class="codehilite"><pre><span class="k">class</span> <span class="nc">FileSystem</span>
144143
<span class="p">{</span>
145144
<span class="nl">public:</span>

0 commit comments

Comments
 (0)