Skip to content

Instantly share code, notes, and snippets.

@brendanashworth
Created June 5, 2015 00:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save brendanashworth/7eb64c993f6fe4218832 to your computer and use it in GitHub Desktop.
Save brendanashworth/7eb64c993f6fe4218832 to your computer and use it in GitHub Desktop.
node::AtExit callback test
#include <node.h>
#include <stdio.h>
using namespace v8;
void Exit(void* arg) {
printf("node::AtExit called\n");
}
void Initialize(Handle<Object> exports) {
node::AtExit(Exit);
}
NODE_MODULE(binding, Initialize)
{
"targets": [
{
"target_name": "binding",
"sources": [
"binding.cc"
]
}
]
}
var binding = require('./build/Release/binding');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment