A
A
Alexey2015-02-12 17:46:05
.NET
Alexey, 2015-02-12 17:46:05

How to convert objects with many links to objects without links?

The garbage collection documentation has an interesting recommendation. If an object contains many references, then the amount of garbage collector work increases. A common trick (especially for large objects) is to convert objects with many references to objects without references (for example, instead of storing a reference, store an index). What is meant? I have never met this before, or maybe I misunderstand what is required.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
AxisPod, 2015-02-13
@AxisPod

Use dictionaries to store objects. They hint at it.

M
MrDywar Pichugin, 2015-02-22
@Dywar

Use - Generic Classes (C# Programming Guide)
https://msdn.microsoft.com/en-us/library/sz6zd40f.aspx
For example "List" will store a collection of structs for an int, not boxed objects.
Google for the word "Generic Class".

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question