An object typically goes through most of the following states between the time it is allocated and the time its resources are finally returned to the system for reuse.
- Created
- In use (strongly reachable)
- Invisible
- Unreachable
- Collected
- Finalized
- Deallocated
Lets understand these in detail :