performance impact of circular references
- From: "colin" <colin.rowe1@xxxxxxxxxxxxxxxxxx>
- Date: Mon, 6 Oct 2008 14:44:44 +0100
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 =^.^=
.
- Follow-Ups:
- Re: performance impact of circular references
- From: Marc Gravell
- Re: performance impact of circular references
- From: Jon Skeet [C# MVP]
- Re: performance impact of circular references
- Prev by Date: RE: Templated Combobox Tooltips from Items
- Next by Date: Re: performance impact of circular references
- Previous by thread: Refereanced COM Object Versus Dynamic Load Of COM Object
- Next by thread: Re: performance impact of circular references
- Index(es):
Relevant Pages
|