thanks for the replies, the biggest problem I was having was that the
some of my objects were being aded to event handlers automatically
such as directx device and had some helper dictionaries wich were static.
so my whole tree structure never got collected,
as I started to open and close a few large trees i soon ran out of memory.
however i managed to turn the automatic event handler off,
and make the dictionaries non static.
took me quite some time to track down the eventhandlers, and find a way to
turn
this feature off. although ive probably got to find out what I need to do
in place of the event handlers but i could at least use weak references
here,
as ive used elsewhere to cache the texture objects etc so i can reuse
existing ones.
My serialization is all binary format and so each object has to have its own
routine.
looks like i might need to investigate an efficient way to make sure
the GC doesnt leave so much uncollected for so long, although for now
I just do it manualy to make sure there are no actual memory leaks,
the taskbar displays the memory used and clicking on it does a colection.
thanks
Colin.
"Marc Gravell" <ma**********@gmail.comwrote in message
news:uD*************@TK2MSFTNGP05.phx.gbl...
The only common issue with circular object references is tree-based
serialization (for example, XmlSerializer and DataContractSerializer in
its default mode). Graph-based serializers (BinaryFormatter,
DataContractSerializer with the right options) are fine, though.
Regular GC etc is fine with circular object references.