- Load the assembly
- Execute static initialisers
- "new" call:
- allocate memory
- execute non-static initialisers
- execute constructor
- the instance is now ready to be used
- after the last reference to the object has vanished: if the object has no finalizer, it is now ready for collection; if the object has a finalizer, it is put on the finalizer queue.
- (optional) the objects from the finalizer queue have their finalizer called in a special thread; if there is still no reference from the application to the object, it too becomes now eligible for garbage collection
- the garbage collector deallocates memory
Monday, January 16, 2012
Tell Something about class/object life cycle...
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment