Home »

Do I have any control over the garbage collection algorithm?

Question ListDo I have any control over the garbage collection algorithm?
ethanbrown author asked 8 years ago
1 Answers
adamemliy16 author answered 8 years ago

A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately.
Also there is a gcConcurrent setting that can be specified via the application configuration file. This specifies whether or not the garbage collector performs some of its collection activities on a separate thread. The setting only applies on multi-processor machines, and defaults to true.

Please login or Register to Submit Answer