Archived

This topic is now archived and is closed to further replies.

yaroslavd

Problem with loading

Recommended Posts

Hi, guys. I wrote a saving/loading utility. I can save fine, but when I try to load a cyclic reference, a problem occurs. Consider this:
class A { B b; }
class B { A a; }
I try to load a saved instance of class A. It loads fine. b is initialized fine, except b.a is uninitilized. This happens because: I load class A. It loads the saved instance of B and stores it in b. However, since a FileStream for a is already open, it remains uninitialized. Please help. Thanks in advance.

Share this post


Link to post
Share on other sites