Thank you Rick, it was good to know.

Just for curiosity, what do you people thought, to emulate RAII within 
JavaScript for those object which need some clean up? Am I doing it 
completely wrong? I mean, an exception can easily get thrown in JavaScript 
and try..catch cannot catch error within callbacks. And domains just feel 
wrong. For those who does not know what RAII is, it is an automatic way to 
invoke a destructor when the object get out of reach, by normal control 
flow or an exception get thrown. See wikipedia: 
http://en.wikipedia.org/wiki/Resource_Acquisition_Is_Initialization

And Nathan (or if there is someone else which can do a serious guess), 
because you have not answered I assume it will be fine to use your library 
heavily. With heavily do I mean having around 10 000 concurrent weak 
objects alive. If you believe it would not be case, please let me know.

Thanks in advance.

Den tisdagen den 23:e oktober 2012 kl. 01:20:19 UTC+2 skrev Rick Waldron:
>
>
> On Monday, October 22, 2012 at 5:22 PM, Fredrik O wrote:
>
>
>
> PS. How would weak maps be used to call a custom function on garbage 
> collection?
>
>
> I think you've misunderstood, WeakMaps don't facilitate this
>
> Rick
>  
>
>  
>
>
> What are your thoughts?
>
> Thanks in advance!
>
>  -- 
> Job Board: http://jobs.nodejs.org/
> Posting guidelines: 
> 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 post to this group, send email to nod...@googlegroups.com <javascript:>
> To unsubscribe from this group, send email to
> nodejs+un...@googlegroups.com <javascript:>
> For more options, visit this group at
> http://groups.google.com/group/nodejs?hl=en?hl=en
>  
>  
>  

-- 
Job Board: http://jobs.nodejs.org/
Posting guidelines: 
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 post to this group, send email to nodejs@googlegroups.com
To unsubscribe from this group, send email to
nodejs+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/nodejs?hl=en?hl=en

Reply via email to