Thank you!
Great help here. Amazing folks!
On Nov 17, 2017 6:21 PM, "J Decker" wrote:
>
>
> On Fri, Nov 17, 2017 at 7:25 AM, Jean-Marc Le Roux <
> jeanmarc.ler...@aerys.in> wrote:
>
>> My assumption is that my test app terminates before the GC has a chance
>> to run.
>> To test this:
>>
>>-
On Fri, Nov 17, 2017 at 7:25 AM, Jean-Marc Le Roux wrote:
> My assumption is that my test app terminates before the GC has a chance to
> run.
> To test this:
>
>- I run node with the --expose-gc option
>- I call global.gc() at the end of my test app
>
> In this case, the destructor of my
My assumption is that my test app terminates before the GC has a chance to
run.
To test this:
- I run node with the --expose-gc option
- I call global.gc() at the end of my test app
In this case, the destructor of my ObjectWrap is indeed called.
*So it seams the GC doesn't simply "collect
Thanks for the great help!
I think it makes a lot of sense now.
So I've extended ObjectWrap like so:
class BSONObject : public node::ObjectWrap
> {
> private:
> bson_t* _bson;
> public:
> BSONObject(bson_t* bson, Local tpl) :
> _bson(bson)
> {
> Local obj = tpl->NewIns