A class is a blueprint. Calling new builds an object on the heap, and a handle is the only way to reach it.
Idea | What it is | Where it lives |
|---|---|---|
Class | A type definition: properties plus methods | Compiled code, no memory |
Object | One runtime instance built by new | Simulator heap |
Handle | A reference variable pointing at an object, or null | Any variable of a class type |
Lesson | Content |
|---|---|
Transaction objects with new, and the construction flow. | |
Aliasing checks, null guards, and reachability. | |
Argument forwarding through an inheritance chain. | |
Independent snapshots for scoreboards. | |
Name resolution and forward declarations. |
Nothing immediate happens to A. The handle now points at B. A becomes unreachable, so the simulator may reclaim it. Reclamation timing is implementation-dependent.