Skip to content

Instantly share code, notes, and snippets.

@stepancheg
Created May 30, 2013 19:05
Show Gist options
  • Save stepancheg/5680287 to your computer and use it in GitHub Desktop.
Save stepancheg/5680287 to your computer and use it in GitHub Desktop.
#include <unistd.h>
#include <string.h>
template <typename T>
void MoveObjFromBuffer222(char* data, size_t size) {
char* buf = new char[size];
delete[] buf;
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
getpid();
}
struct T {};
int main(int argc, char** argv) {
MoveObjFromBuffer222<T>(0, 0);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment