Re: How do I trace objects on the heap with JS 59
Boris Zbarsky <[email protected]> Tue, 14 Aug 2018 14:19:26 -0400
| Newsgroups | gmane.comp.mozilla.devel.jseng |
|---|---|
| Message-ID | <[email protected]> |
On 8/10/18 5:34 AM, James Stortz wrote: > So, here's an actual example to clarify. Please tell me if this simple > concept is correct. What you have here will keep the thing stored in the "obj" member of a FrontEnd struct alive as long as that FrontEnd struct is alive, I believe. That's assuming there is no API to mutate the value of that member other than the FrontEnd constructor. Given that, deleting the FrontEnd in the object's finalizer doesn't really make sense: the FrontEnd will keep the object alive as long as the FrontEnd is alive, as far as I can tell. What is the desired lifetime relationship here between the FrontEnd, the BackEnd, and the JSObject that the FrontEnd points to? -Boris