Skip to content

Instantly share code, notes, and snippets.

@kalman5
Created March 9, 2014 21:51
Show Gist options
  • Save kalman5/9455286 to your computer and use it in GitHub Desktop.
Save kalman5/9455286 to your computer and use it in GitHub Desktop.
Factory Getting big object by copy.
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