Firefox does not support __proto__, so only V8 leaks here? Am 11.03.2012 03:22, schrieb Jimb Esser: > I didn't completely understand your code, but if you're creating a new > prototype inheriting from the old one multiple times, I think you > should still be able to access all the old ones (e.g. with > obj.__proto__.__proto__.__proto__), so since it's accessible, it will > not and must not be garbage collected, so, yes, effectively that will > leak. > > On Mar 10, 5:27 pm, Phoscur <[email protected]> wrote: >> Considering that a long chain of prototypes is created. Interact >> 10000times with a ValueObject, the prototype chain stores 10000 getter >> closures. If the last one is kept is basically stores all older states >> in it's prototype chain. Is the garbage collection going to clean those >> closures up at same point after they get "overshadowed" by the newer >> states, or would it become a memory leak? >> >> Am 10.03.2012 22:06, schrieb Marcel Laverdet: >> >> >> >> >> >> >> >>> If you can write it in JS, v8 can garbage collect it. >>> On Sat, Mar 10, 2012 at 2:46 PM, Phoscur <[email protected] >>> <mailto:[email protected]>> wrote: >>> Short Question: Do V8 and J�germonkey garbage collect prototype chains >>> at some point? >>> Let code speak:https://gist.github.com/e83c353f7f16e14e4333 >>> Actually, while writing this, I found the solution (line 69/70), but I >>> would like to leave it without that, as forgetting it may produce a >>> memory leak everytime. >>> Also: How can I improve this pattern? Is it wrong to mix classical and >>> prototypal inheritance like this? >>> I realize that this is one of the JavaScript features, static >>> programming languages are only capable of with clumsy reflection. >>> And it >>> all comes from this magical Object.create, which uses I'm still >>> exploring. >>> If you think this is OT for nodejs, show me a better mailinglist >>> to post >>> this please. >>> Best regards, >>> Ph >>> -- >>> 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 [email protected] >>> <mailto:[email protected]> >>> To unsubscribe from this group, send email to >>> [email protected] >>> <mailto:nodejs%[email protected]> >>> 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 [email protected] >>> To unsubscribe from this group, send email to >>> [email protected] >>> 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 [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/nodejs?hl=en?hl=en
