Re: [nodejs] garbage collection

56 views
Skip to first unread message

Alan Hoffmeister

unread,
Sep 28, 2017, 12:06:59 PM9/28/17
to nodejs
Nope.


2017-09-28 12:29 GMT-03:00 Omagho <im.om...@gmail.com>:
hello everyone, is it possible to delete a javascript object from memory without waiting/forcing the garbage collector to execute ?  

--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/nodejs/387a14b1-08ea-48c0-9953-945fadc89888%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Omagho

unread,
Sep 28, 2017, 12:07:11 PM9/28/17
to nodejs
hello , is it possible to delete an object from memory without waiting/forcing garbage collector to execute ? i'm trying to impliment an addon to accomplish that but i wasn't able to access the actual object this is my source code  


void removeObject(const v8::FunctionCallbackInfo<Value>& args) {
Isolate* isolate = args.GetIsolate();
v8::Local<Value> aa = {args[0]};
aa.Clear();
   cout<<aa.IsEmpty()<<endl;
   args.GetReturnValue();
}

Axel Kittenberger

unread,
Oct 3, 2017, 11:01:01 AM10/3/17
to nodejs
I don't get it what you want to achive, but if you want to remove enormous amounts of memory data on a whimp, simply wrap them as native around a Wrapper, provide a getter/setter function and return undefined, if it has been freed.

The node native interface has examples of wrapper objects.
You cannot free the wrapper itself without garbage collection but the stuff it wraps around.


--
Job board: http://jobs.nodejs.org/
New group rules: https://gist.github.com/othiym23/9886289#file-moderation-policy-md
Old group rules: https://github.com/joyent/node/wiki/Mailing-List-Posting-Guidelines
---
You received this message because you are subscribed to the Google Groups "nodejs" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs+unsubscribe@googlegroups.com.
To post to this group, send email to nod...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages