When I pack the SharePoint class into my new framework I meet a deadlock. It uses my memory up. The following is details.
I created a class FPWeb, and it has a property of "Lists", which represents a FPListCollection object which contains all the list in the current web. And in class FPListCollection I write a property of ParentWeb which is a FPWeb type and represents the web which the current list object belongs to. So the problem comes out:
When I creat a FPWeb object I should creat the Lists whose type is FPListCollection first. And When I creat the Lists, I should creat the ParentWeb whose type is FPWeb first. So I creat the ParentWeb, which means I should creat the Lists again~. Obviously, I creat and creat with no end. Quickly, my memory is used up.
So this is my deadlock, what should I do to deal with it? This is a headache problem.
Related Code.