Changes between Version 2 and Version 3 of JSRootingGuide
- Timestamp:
- Jun 21, 2014, 9:13:49 PM (10 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
JSRootingGuide
v2 v3 23 23 24 24 == Heap rooting == 25 Rooting on the heap is much different than rooting on the stack. On the stack, new rooted types (like JS::Rooted<T>) are always constructed and destructed in LIFO order. This behaviour gets used for optimization in is essential for all types used for rooting on the stack. Data on the heap can be rooted and unrooted in arbitrary order and needs different types and different approaches.25 Rooting on the heap is much different than rooting on the stack. On the stack, new rooted types (like JS::Rooted<T>) are always constructed and destructed in LIFO order. This behaviour gets used for optimization and is essential for all stack rooting types. Data on the heap can be rooted and unrooted in arbitrary order and needs different types and different approaches. 26 26 27 27 The following sections are an attempt to describe the important differences as well as advantages and disadvantages of the available heap rooting approaches.