Skip to content

Instantly share code, notes, and snippets.

@achalddave
Created March 29, 2013 01:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save achalddave/5268186 to your computer and use it in GitHub Desktop.
Save achalddave/5268186 to your computer and use it in GitHub Desktop.
struct Test {
Point3f x;
void setXStack(float a, float b, float c) {
x = Point3f(a, b, c)
}
void setXHeap(float a, float b, float c) {
x = *(new Point3f(a, b, c));
}
}
Test a();
a.setXStack(1,1,1);
// vs
a.setXHeap(1,1,1);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment