Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Serialization doubt

 
Faisal Ahmad
Ranch Hand
Posts: 355
Chrome Java Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ive just read, during deserialization, the serialized object's constructor is not run. A new object is given space on the heap.

Well, without running constructor, how can we create a new object? And what does it really means "given space on the heap"?
Help appreciated! Thanks.
 
Keith Lynn
Ranch Hand
Posts: 2409
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Faisal Pasha:
Ive just read, during deserialization, the serialized object's constructor is not run. A new object is given space on the heap.

Well, without running constructor, how can we create a new object? And what does it really means "given space on the heap"?
Help appreciated! Thanks.


You don't want to create a new object. You want to read the object that was stored.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic