performance impact of circular references

Tech-Archive recommends: Fix windows errors by optimizing your registry



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 =^.^=


.



Relevant Pages

  • Re: Add and object or a function?
    ... Closures produce less obvious circular references, ... produce a circular reference (The ID causes a global property to refer ... No. 'Better' cannot be reasonably assessed without a context to provide ...
    (comp.lang.javascript)
  • Re: IDE dies during compile
    ... > fairly sure there are no circular references or EVERYONE would be having ... Yeah everyones cpu spikes/bursts for this kind of request, i was more interested in sustained ... If it falls over before it even hits ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Memory Leak IE Javascript attribute add onblur
    ... and breaking circular chains of references usually involves ... It is better to break only the circular references you mad in your ... DOM leaks go away. ... Ajax is pretty, but always seems to cause more problems than it's ...
    (comp.lang.javascript)
  • Re: Object Inspector
    ... you must be creating the object the property refers ... My real issue is when some/all these references are *circular ... having circular references isn't a bad thing ... I have been able to do this with Jedi's JvInspector and it works ...
    (borland.public.delphi.thirdpartytools.general)
  • Re: Setting variables to Nothing
    ... >immediately before it was automatically set to nothing was ... >or lost references, and the only solution is to avoid problems ... >Circular references can be broken by setting the references ... This is a coding practice. ...
    (microsoft.public.access.modulesdaovba)