mirror of
https://github.com/nodejs/node.git
synced 2024-11-29 15:06:33 +01:00
baed9d514d
This is sloppy: after each ObjectWrap allocation the user needs to call ObjectWrap::InformV8ofAllocation(). In addition each class deriving from ObjectWrap needs to implement the virtual method size() which should return the size of the derived class. If I was better at C++ I could possibly make this less ugly. For now this is how it is. Memory usage looks much better after this commit.
8 lines
217 B
JavaScript
8 lines
217 B
JavaScript
new node.http.Server(function (msg) {
|
|
setTimeout(function () {
|
|
msg.sendHeader(200, [["Content-Type", "text/plain"]]);
|
|
msg.sendBody("Hello World");
|
|
msg.finish();
|
|
}, 1000);
|
|
}).listen(8000, "localhost");
|