Skip to content

Instantly share code, notes, and snippets.

@Lavesson
Created March 21, 2013 01:31
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 Lavesson/5210011 to your computer and use it in GitHub Desktop.
Save Lavesson/5210011 to your computer and use it in GitHub Desktop.
#include <memory>
int main()
{
// Create the device, buffer and a mesh
auto device = std::unique_ptr<Device>(new Device());
auto buffer = device->CreateVertexBuffer();
auto mesh = std::unique_ptr<Mesh>(new Mesh(buffer.get()));
// ... Doing a bunch of stuff
// No cleanup necessary
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment