Created
March 21, 2013 01:31
-
-
Save Lavesson/5210011 to your computer and use it in GitHub Desktop.
This file contains 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
#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