Created
March 9, 2014 21:51
-
-
Save kalman5/9455286 to your computer and use it in GitHub Desktop.
Factory Getting big object by copy.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class JumboFactory { | |
... | |
Jumbo getJumboByCopy() { | |
return theJumboObject; | |
} | |
... | |
private: | |
Jumbo theJumboObject; | |
}; | |
JumboFactory myJF; | |
Jumbo myJumbo = myJF.getJumboByCopy(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment