Created
June 5, 2015 00:34
-
-
Save brendanashworth/7eb64c993f6fe4218832 to your computer and use it in GitHub Desktop.
node::AtExit callback test
This file contains hidden or 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 <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) |
This file contains hidden or 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
{ | |
"targets": [ | |
{ | |
"target_name": "binding", | |
"sources": [ | |
"binding.cc" | |
] | |
} | |
] | |
} |
This file contains hidden or 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
var binding = require('./build/Release/binding'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment