• Advertisement


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

Problem with loading

This topic is 5102 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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

  • Advertisement