C
colin
Hi,
what is the impact of circular references in c# if any ?
I know c# GC takes care of the hassle of releasing cirular references.
It would be too problomatic to try and implement a dispose mechanism.
I have a large data structure wich at the top I have called "World"
it is read in from files and contains many objects and sub objects each may
reference any other in a circular fashion,
this I have no control over.
each object has to reference the World particularly in order to know where
to look for a file
so it can dynamicaly load referenced objects etc.
I now monitor the GC.GetTotalMemory and it rises to 600Mb,
eventualy faling to 260mb once the GC has run.
however once I have closed the World it stays there
untill I call GC.Collect, however this is quite a slow call,
I was wondering if the circular references make this call more
likely to be necessary.
thanks
Colin =^.^=
what is the impact of circular references in c# if any ?
I know c# GC takes care of the hassle of releasing cirular references.
It would be too problomatic to try and implement a dispose mechanism.
I have a large data structure wich at the top I have called "World"
it is read in from files and contains many objects and sub objects each may
reference any other in a circular fashion,
this I have no control over.
each object has to reference the World particularly in order to know where
to look for a file
so it can dynamicaly load referenced objects etc.
I now monitor the GC.GetTotalMemory and it rises to 600Mb,
eventualy faling to 260mb once the GC has run.
however once I have closed the World it stays there
untill I call GC.Collect, however this is quite a slow call,
I was wondering if the circular references make this call more
likely to be necessary.
thanks
Colin =^.^=