How to create, handle, and destroy JS::Heap<T> objects in Spidermonkey?
问题 Using Spidermonkey 24, 38, 45 Spidermonkey documentation says: "GC thing pointers on the heap must be wrapped in a JS::Heap. The only exception to this is if they are added as roots with the JS_AddRoot() functions or JS::PersistentRooted class, but don't do this unless it's really necessary. JS::Heap pointers must also continue to be traced in the normal way , which is not covered here." What exactly does tracing mean in this case? Is the following code missing something? struct Foo { Foo(JS: