mirror of
https://github.com/wnagrodzki/CocoaProgrammingGuidelines.git
synced 2025-05-03 17:41:51 +02:00
Lazy loading reduces memory footprint. Adds thread safety mention.
This commit is contained in:
parent
1ad5e4abce
commit
134c69a5bc
2 changed files with 1 additions and 1 deletions
Binary file not shown.
|
@ -648,7 +648,7 @@ When developing a class or a framework exceptions are thrown to indicate that cl
|
|||
|
||||
\subsection{Lazy loading reduces memory footprint}
|
||||
|
||||
Creating an object on demand reduces initialization time of containing class.
|
||||
Creating an object on demand reduces initialisation time of a containing class. The following getter implementation is not thread safe, as two threads might try to initialise \inlinecode{\_cacheDictionary} at the same time.
|
||||
|
||||
\begin{codelisting}
|
||||
- (NSMutableDictionary *)cacheDictionary
|
||||
|
|
Loading…
Add table
Reference in a new issue